From 814bc5ccda51009327b6b5ff0fc2c088d537a636 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 6 Jan 2009 14:21:27 -0700 Subject: mesa: fix GL_DEPTH_CLEAR_VALUE casting (cherry picked from commit d14d494dcda3d80ec2cf452551c680ffb432e306) --- src/mesa/main/get.c | 6 +++--- src/mesa/main/get_gen.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index f72aa6a2882..8ce9b0ae69a 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -289,7 +289,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits); break; case GL_DEPTH_CLEAR_VALUE: - params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear); + params[0] = FLOAT_TO_BOOLEAN(((GLfloat) ctx->Depth.Clear)); break; case GL_DEPTH_FUNC: params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func); @@ -2137,7 +2137,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits); break; case GL_DEPTH_CLEAR_VALUE: - params[0] = ctx->Depth.Clear; + params[0] = ((GLfloat) ctx->Depth.Clear); break; case GL_DEPTH_FUNC: params[0] = ENUM_TO_FLOAT(ctx->Depth.Func); @@ -3985,7 +3985,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = ctx->DrawBuffer->Visual.depthBits; break; case GL_DEPTH_CLEAR_VALUE: - params[0] = FLOAT_TO_INT(ctx->Depth.Clear); + params[0] = FLOAT_TO_INT(((GLfloat) ctx->Depth.Clear)); break; case GL_DEPTH_FUNC: params[0] = ENUM_TO_INT(ctx->Depth.Func); diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 152e378b4fe..a191b045d33 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -180,7 +180,7 @@ StateVars = [ ( "GL_DEPTH_BIAS", GLfloat, ["ctx->Pixel.DepthBias"], "", None ), ( "GL_DEPTH_BITS", GLint, ["ctx->DrawBuffer->Visual.depthBits"], "", None ), - ( "GL_DEPTH_CLEAR_VALUE", GLfloatN, ["ctx->Depth.Clear"], "", None ), + ( "GL_DEPTH_CLEAR_VALUE", GLfloatN, ["((GLfloat) ctx->Depth.Clear)"], "", None ), ( "GL_DEPTH_FUNC", GLenum, ["ctx->Depth.Func"], "", None ), ( "GL_DEPTH_RANGE", GLfloatN, [ "ctx->Viewport.Near", "ctx->Viewport.Far" ], "", None ), -- cgit v1.2.3 From 338ae34d227fce8b6f358ca90d383d0cfb87c868 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 6 Jan 2009 14:28:49 -0700 Subject: mesa: Move var declaration to top of scope. (cherry picked from commit 3740a06e28f4cd09e2a3dce2da60320aa9304df1) --- src/mesa/shader/slang/slang_codegen.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 8e28be8abd1..e8e496f915d 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -3556,8 +3556,16 @@ _slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper) index = (GLint) oper->children[1].literal[0]; if (oper->children[1].type != SLANG_OPER_LITERAL_INT || index >= (GLint) max) { +#if 0 slang_info_log_error(A->log, "Invalid array index for vector type"); + printf("type = %d\n", oper->children[1].type); + printf("index = %d, max = %d\n", index, max); + printf("array = %s\n", (char*)oper->children[0].a_id); + printf("index = %s\n", (char*)oper->children[1].a_id); return NULL; +#else + index = 0; +#endif } n = _slang_gen_operation(A, &oper->children[0]); -- cgit v1.2.3 From 1fa978c8911d00e7cac0a114110e98ebdbe4d57d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 6 Jan 2009 17:24:23 -0700 Subject: glsl: implement loop unrolling for simple 'for' loops Loops such as this will be unrolled: for (i = 0; i < 4; ++i) { body; } where 'body' isn't too large. This also helps to fix the issue reported in bug #19190. The problem there is indexing vector types with a variable index. For example: vec4 v; v[2] = 1.0; // equivalent to v.z = 1.0 v[i] = 2.0; // variable index into vector!! Since the for-i loop can be unrolled, we can avoid the problems associated with variable indexing into a vector (at least in this case). --- src/mesa/shader/slang/slang_codegen.c | 229 ++++++++++++++++++++++++++++++---- 1 file changed, 205 insertions(+), 24 deletions(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index e8e496f915d..0d9674f05c4 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -57,6 +57,14 @@ #include "slang_print.h" +/** Max iterations to unroll */ +const GLuint MAX_FOR_LOOP_UNROLL_ITERATIONS = 4; + +/** Max for-loop body size (in slang operations) to unroll */ +const GLuint MAX_FOR_LOOP_UNROLL_BODY_SIZE = 50; + + + static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); @@ -2439,40 +2447,213 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) /** - * Generate for-loop using high-level IR_LOOP instruction. + * Recursively count the number of operations rooted at 'oper'. + * This gives some kind of indication of the size/complexity of an operation. + */ +static GLuint +sizeof_operation(const slang_operation *oper) +{ + if (oper) { + GLuint count = 1; /* me */ + GLuint i; + for (i = 0; i < oper->num_children; i++) { + count += sizeof_operation(&oper->children[i]); + } + return count; + } + else { + return 0; + } +} + + +/** + * Determine if a for-loop can be unrolled. + * At this time, only a rather narrow class of for loops can be unrolled. + * See code for details. + * When a loop can't be unrolled because it's too large we'll emit a + * message to the log. + */ +static GLboolean +_slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) +{ + GLuint bodySize; + GLint start, end; + const char *varName; + + assert(oper->type == SLANG_OPER_FOR); + assert(oper->num_children == 4); + + /* children[0] must be "i=constant" */ + if (oper->children[0].type != SLANG_OPER_EXPRESSION) + return GL_FALSE; + if (oper->children[0].children[0].type != SLANG_OPER_ASSIGN) + return GL_FALSE; + if (oper->children[0].children[0].children[0].type != SLANG_OPER_IDENTIFIER) + return GL_FALSE; + if (oper->children[0].children[0].children[1].type != SLANG_OPER_LITERAL_INT) + return GL_FALSE; + + /* children[1] must be "ichildren[1].type != SLANG_OPER_EXPRESSION) + return GL_FALSE; + if (oper->children[1].children[0].type != SLANG_OPER_LESS) + return GL_FALSE; + if (oper->children[1].children[0].children[0].type != SLANG_OPER_IDENTIFIER) + return GL_FALSE; + if (oper->children[1].children[0].children[1].type != SLANG_OPER_LITERAL_INT) + return GL_FALSE; + + /* children[2] must be "i++" or "++i" */ + if (oper->children[2].type != SLANG_OPER_POSTINCREMENT && + oper->children[2].type != SLANG_OPER_PREINCREMENT) + return GL_FALSE; + if (oper->children[2].children[0].type != SLANG_OPER_IDENTIFIER) + return GL_FALSE; + + /* make sure the same variable name is used in all places */ + if ((oper->children[0].children[0].children[0].a_id != + oper->children[1].children[0].children[0].a_id) || + (oper->children[0].children[0].children[0].a_id != + oper->children[2].children[0].a_id)) + return GL_FALSE; + + varName = (const char *) oper->children[0].children[0].children[0].a_id; + + /* children[3], the loop body, can't be too large */ + bodySize = sizeof_operation(&oper->children[3]); + if (bodySize > MAX_FOR_LOOP_UNROLL_BODY_SIZE) { + slang_info_log_print(A->log, + "Note: 'for (%s ... )' body is too large/complex" + " to unroll", + varName); + return GL_FALSE; + } + + /* get/check loop iteration limits */ + start = (GLint) oper->children[0].children[0].children[1].literal[0]; + end = (GLint) oper->children[1].children[0].children[1].literal[0]; + if (end - start > MAX_FOR_LOOP_UNROLL_ITERATIONS) { + slang_info_log_print(A->log, + "Note: 'for (%s=%d; %s<%d; ++%s)' is too" + " many iterations to unroll", + varName, start, varName, end, varName); + return GL_FALSE; + } + + return GL_TRUE; /* we can unroll the loop */ +} + + +/** + * Unroll a for-loop. + * First we determine the number of iterations to unroll. + * Then for each iteration: + * make a copy of the loop body + * replace instances of the loop variable with the current iteration value + * generate IR code for the body + * \return pointer to generated IR code or NULL if error, out of memory, etc. + */ +static slang_ir_node * +_slang_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) +{ + GLint start, end, iter; + slang_ir_node *n, *root = NULL; + + start = (GLint) oper->children[0].children[0].children[1].literal[0]; + end = (GLint) oper->children[1].children[0].children[1].literal[0]; + + for (iter = start; iter < end; iter++) { + slang_operation *body; + slang_atom id; + + /* make a copy of the loop body */ + body = slang_operation_new(1); + if (!body) + return NULL; + + if (!slang_operation_copy(body, &oper->children[3])) + return NULL; + + id = oper->children[0].children[0].children[0].a_id; + + /* in body, replace instances of 'id' with literal 'iter' */ + { + slang_variable *oldVar; + slang_operation *newOper; + + oldVar = _slang_variable_locate(oper->locals, id, GL_TRUE); + if (!oldVar) { + /* undeclared loop variable */ + slang_operation_delete(body); + return NULL; + } + + newOper = slang_operation_new(1); + newOper->type = SLANG_OPER_LITERAL_INT; + newOper->literal_size = 1; + newOper->literal[0] = iter; + + /* replace instances of the loop variable with newOper */ + slang_substitute(A, body, 1, &oldVar, &newOper, GL_FALSE); + } + + /* do IR codegen for body */ + n = _slang_gen_operation(A, body); + root = new_seq(root, n); + + slang_operation_delete(body); + } + + return root; +} + + +/** + * Generate IR for a for-loop. Unrolling will be done when possible. */ static slang_ir_node * _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) { - /* - * init code (child[0]) - * LOOP: - * BREAK if !expr (child[1]) - * body code (child[3]) - * tail code: - * incr code (child[2]) // XXX continue here - */ - slang_ir_node *prevLoop, *loop, *cond, *breakIf, *body, *init, *incr; + GLboolean unroll = _slang_can_unroll_for_loop(A, oper); - init = _slang_gen_operation(A, &oper->children[0]); - loop = new_loop(NULL); + if (unroll) { + slang_ir_node *code = _slang_unroll_for_loop(A, oper); + if (code) + return code; + } - /* save old, push new loop */ - prevLoop = A->CurLoop; - A->CurLoop = loop; + /* conventional for-loop code generation */ + { + /* + * init code (child[0]) + * LOOP: + * BREAK if !expr (child[1]) + * body code (child[3]) + * tail code: + * incr code (child[2]) // XXX continue here + */ + slang_ir_node *prevLoop, *loop, *cond, *breakIf, *body, *init, *incr; + init = _slang_gen_operation(A, &oper->children[0]); + loop = new_loop(NULL); - cond = new_cond(new_not(_slang_gen_operation(A, &oper->children[1]))); - breakIf = new_break_if_true(A->CurLoop, cond); - body = _slang_gen_operation(A, &oper->children[3]); - incr = _slang_gen_operation(A, &oper->children[2]); + /* save old, push new loop */ + prevLoop = A->CurLoop; + A->CurLoop = loop; - loop->Children[0] = new_seq(breakIf, body); - loop->Children[1] = incr; /* tail code */ + cond = new_cond(new_not(_slang_gen_operation(A, &oper->children[1]))); + breakIf = new_break_if_true(A->CurLoop, cond); + body = _slang_gen_operation(A, &oper->children[3]); + incr = _slang_gen_operation(A, &oper->children[2]); - /* pop loop, restore prev */ - A->CurLoop = prevLoop; + loop->Children[0] = new_seq(breakIf, body); + loop->Children[1] = incr; /* tail code */ - return new_seq(init, loop); + /* pop loop, restore prev */ + A->CurLoop = prevLoop; + + return new_seq(init, loop); + } } -- cgit v1.2.3 From 0b0d0dcdef2b914dceb30a8e9a80f403b0311efc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 6 Jan 2009 17:36:20 -0700 Subject: glsl: loop unroll adjustments Add a "max complexity" heuristic to allow unrolling long loops with small bodies and short loops with large bodies. The loop unroll limits may need further tweaking... --- src/mesa/shader/slang/slang_codegen.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 0d9674f05c4..64d72b5bfa3 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -58,11 +58,18 @@ /** Max iterations to unroll */ -const GLuint MAX_FOR_LOOP_UNROLL_ITERATIONS = 4; +const GLuint MAX_FOR_LOOP_UNROLL_ITERATIONS = 20; /** Max for-loop body size (in slang operations) to unroll */ const GLuint MAX_FOR_LOOP_UNROLL_BODY_SIZE = 50; +/** Max for-loop body complexity to unroll. + * We'll compute complexity as the product of the number of iterations + * and the size of the body. So long-ish loops with very simple bodies + * can be unrolled, as well as short loops with larger bodies. + */ +const GLuint MAX_FOR_LOOP_UNROLL_COMPLEXITY = 200; + static slang_ir_node * @@ -2533,6 +2540,10 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) /* get/check loop iteration limits */ start = (GLint) oper->children[0].children[0].children[1].literal[0]; end = (GLint) oper->children[1].children[0].children[1].literal[0]; + + if (start >= end) + return GL_FALSE; /* degenerate case */ + if (end - start > MAX_FOR_LOOP_UNROLL_ITERATIONS) { slang_info_log_print(A->log, "Note: 'for (%s=%d; %s<%d; ++%s)' is too" @@ -2541,6 +2552,14 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) return GL_FALSE; } + if ((end - start) * bodySize > MAX_FOR_LOOP_UNROLL_COMPLEXITY) { + slang_info_log_print(A->log, + "Note: 'for (%s=%d; %s<%d; ++%s)' will generate" + " too much code to unroll", + varName, start, varName, end, varName); + return GL_FALSE; + } + return GL_TRUE; /* we can unroll the loop */ } -- cgit v1.2.3 From 1a414a4dbe382b972061f3dc20ca648d1e8332b3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 08:25:59 -0700 Subject: mesa: OSMesa Makefile fixes (use LIB_DIR) --- src/mesa/drivers/osmesa/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile index d6a18b1d755..3b3984200aa 100644 --- a/src/mesa/drivers/osmesa/Makefile +++ b/src/mesa/drivers/osmesa/Makefile @@ -30,8 +30,7 @@ CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mesa/libglapi.a $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ -default: -# $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) +default: $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) @ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ $(MAKE) osmesa16 ; \ else \ @@ -42,9 +41,9 @@ default: # The normal libOSMesa is used in conjuction with libGL -osmesa8: $(TOP)/lib/$(OSMESA_LIB_NAME) +osmesa8: $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) -$(TOP)/lib/$(OSMESA_LIB_NAME): $(OBJECTS) +$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \ -- cgit v1.2.3 From cea7f7b76365dc41ba0e577d992193997b4f246f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 08:32:21 -0700 Subject: glsl: remove dead code --- src/mesa/shader/slang/slang_log.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c index 25f696f67ea..d5576d7ee2d 100644 --- a/src/mesa/shader/slang/slang_log.c +++ b/src/mesa/shader/slang/slang_log.c @@ -1,8 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 + * Version: 7.3 * * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, 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"), @@ -43,11 +44,7 @@ void slang_info_log_destruct(slang_info_log * log) { if (!log->dont_free_text) -#if 0 - slang_alloc_free(log->text); -#else _mesa_free(log->text); -#endif } static int @@ -64,18 +61,10 @@ slang_info_log_message(slang_info_log * log, const char *prefix, if (log->text != NULL) { GLuint old_len = slang_string_length(log->text); log->text = (char *) -#if 0 - slang_alloc_realloc(log->text, old_len + 1, old_len + size); -#else _mesa_realloc(log->text, old_len + 1, old_len + size); -#endif } else { -#if 0 - log->text = (char *) (slang_alloc_malloc(size)); -#else log->text = (char *) (_mesa_malloc(size)); -#endif if (log->text != NULL) log->text[0] = '\0'; } -- cgit v1.2.3 From a8542200b306f06d40d3944c42bc9634f425c8b0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 08:54:09 -0700 Subject: glsl: also unroll loops with variable declarations such as "for (int i = 0; ..." --- src/mesa/shader/slang/slang_codegen.c | 82 +++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 24 deletions(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 64d72b5bfa3..7917566c3ed 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -58,7 +58,7 @@ /** Max iterations to unroll */ -const GLuint MAX_FOR_LOOP_UNROLL_ITERATIONS = 20; +const GLuint MAX_FOR_LOOP_UNROLL_ITERATIONS = 32; /** Max for-loop body size (in slang operations) to unroll */ const GLuint MAX_FOR_LOOP_UNROLL_BODY_SIZE = 50; @@ -2487,19 +2487,45 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) GLuint bodySize; GLint start, end; const char *varName; + slang_atom varId; assert(oper->type == SLANG_OPER_FOR); assert(oper->num_children == 4); - /* children[0] must be "i=constant" */ - if (oper->children[0].type != SLANG_OPER_EXPRESSION) - return GL_FALSE; - if (oper->children[0].children[0].type != SLANG_OPER_ASSIGN) - return GL_FALSE; - if (oper->children[0].children[0].children[0].type != SLANG_OPER_IDENTIFIER) - return GL_FALSE; - if (oper->children[0].children[0].children[1].type != SLANG_OPER_LITERAL_INT) + /* children[0] must be either "int i=constant" or "i=constant" */ + if (oper->children[0].type == SLANG_OPER_BLOCK_NO_NEW_SCOPE) { + slang_variable *var; + + if (oper->children[0].children[0].type != SLANG_OPER_VARIABLE_DECL) + return GL_FALSE; + + varId = oper->children[0].children[0].a_id; + + var = _slang_variable_locate(oper->children[0].children[0].locals, + varId, GL_TRUE); + if (!var) + return GL_FALSE; + if (!var->initializer) + return GL_FALSE; + if (var->initializer->type != SLANG_OPER_LITERAL_INT) + return GL_FALSE; + start = (GLint) var->initializer->literal[0]; + } + else if (oper->children[0].type == SLANG_OPER_EXPRESSION) { + if (oper->children[0].children[0].type != SLANG_OPER_ASSIGN) + return GL_FALSE; + if (oper->children[0].children[0].children[0].type != SLANG_OPER_IDENTIFIER) + return GL_FALSE; + if (oper->children[0].children[0].children[1].type != SLANG_OPER_LITERAL_INT) + return GL_FALSE; + + varId = oper->children[0].children[0].children[0].a_id; + + start = (GLint) oper->children[0].children[0].children[1].literal[0]; + } + else { return GL_FALSE; + } /* children[1] must be "ichildren[1].type != SLANG_OPER_EXPRESSION) @@ -2511,6 +2537,8 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) if (oper->children[1].children[0].children[1].type != SLANG_OPER_LITERAL_INT) return GL_FALSE; + end = (GLint) oper->children[1].children[0].children[1].literal[0]; + /* children[2] must be "i++" or "++i" */ if (oper->children[2].type != SLANG_OPER_POSTINCREMENT && oper->children[2].type != SLANG_OPER_PREINCREMENT) @@ -2519,13 +2547,11 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) return GL_FALSE; /* make sure the same variable name is used in all places */ - if ((oper->children[0].children[0].children[0].a_id != - oper->children[1].children[0].children[0].a_id) || - (oper->children[0].children[0].children[0].a_id != - oper->children[2].children[0].a_id)) + if ((oper->children[1].children[0].children[0].a_id != varId) || + (oper->children[2].children[0].a_id != varId)) return GL_FALSE; - varName = (const char *) oper->children[0].children[0].children[0].a_id; + varName = (const char *) varId; /* children[3], the loop body, can't be too large */ bodySize = sizeof_operation(&oper->children[3]); @@ -2537,10 +2563,6 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) return GL_FALSE; } - /* get/check loop iteration limits */ - start = (GLint) oper->children[0].children[0].children[1].literal[0]; - end = (GLint) oper->children[1].children[0].children[1].literal[0]; - if (start >= end) return GL_FALSE; /* degenerate case */ @@ -2578,13 +2600,27 @@ _slang_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) { GLint start, end, iter; slang_ir_node *n, *root = NULL; + slang_atom varId; + + if (oper->children[0].type == SLANG_OPER_BLOCK_NO_NEW_SCOPE) { + /* for (int i=0; ... */ + slang_variable *var; + + varId = oper->children[0].children[0].a_id; + var = _slang_variable_locate(oper->children[0].children[0].locals, + varId, GL_TRUE); + start = (GLint) var->initializer->literal[0]; + } + else { + /* for (i=0; ... */ + varId = oper->children[0].children[0].children[0].a_id; + start = (GLint) oper->children[0].children[0].children[1].literal[0]; + } - start = (GLint) oper->children[0].children[0].children[1].literal[0]; end = (GLint) oper->children[1].children[0].children[1].literal[0]; for (iter = start; iter < end; iter++) { slang_operation *body; - slang_atom id; /* make a copy of the loop body */ body = slang_operation_new(1); @@ -2594,14 +2630,12 @@ _slang_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) if (!slang_operation_copy(body, &oper->children[3])) return NULL; - id = oper->children[0].children[0].children[0].a_id; - - /* in body, replace instances of 'id' with literal 'iter' */ + /* in body, replace instances of 'varId' with literal 'iter' */ { slang_variable *oldVar; slang_operation *newOper; - oldVar = _slang_variable_locate(oper->locals, id, GL_TRUE); + oldVar = _slang_variable_locate(oper->locals, varId, GL_TRUE); if (!oldVar) { /* undeclared loop variable */ slang_operation_delete(body); -- cgit v1.2.3 From 510ed7f51e0a198029835e4d88a1364179c2745c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 08:56:10 -0700 Subject: glsl: disable some unused functions (but don't remove just yet) --- src/mesa/shader/slang/slang_codegen.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 7917566c3ed..8d213607172 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1585,6 +1585,7 @@ swizzle_to_writemask(slang_assemble_ctx *A, GLuint swizzle, } +#if 0 /* not used, but don't remove just yet */ /** * Recursively traverse 'oper' to produce a swizzle mask in the event * of any vector subscripts and swizzle suffixes. @@ -1638,8 +1639,10 @@ resolve_swizzle(const slang_operation *oper) return SWIZZLE_XYZW; } } +#endif +#if 0 /** * Recursively descend through swizzle nodes to find the node's storage info. */ @@ -1651,7 +1654,7 @@ get_store(const slang_ir_node *n) } return n->Store; } - +#endif /** @@ -1724,6 +1727,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, } +#if 0 static void print_funcs(struct slang_function_scope_ *scope, const char *name) { @@ -1737,6 +1741,7 @@ print_funcs(struct slang_function_scope_ *scope, const char *name) if (scope->outer_scope) print_funcs(scope->outer_scope, name); } +#endif /** @@ -3323,6 +3328,7 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) } +#if 0 /** * Determine if the given operation/expression is const-valued. */ @@ -3346,6 +3352,7 @@ _slang_is_constant_expr(const slang_operation *oper) return GL_TRUE; } } +#endif /** -- cgit v1.2.3 From b3c7f7466c068a5eaeb5adf981b6f776560bb6c9 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 7 Jan 2009 12:02:06 +0000 Subject: mesa: Add _mesa_snprintf. On Windows snprintf is renamed as _snprintf. (cherry picked from commit f8f9a1b620d31d1a59855fd502caed325d4a324f) --- src/mesa/main/imports.c | 12 ++++++++++++ src/mesa/main/imports.h | 3 +++ src/mesa/shader/slang/slang_codegen.c | 2 +- src/mesa/shader/slang/slang_emit.c | 4 ++-- src/mesa/shader/slang/slang_link.c | 8 ++++---- 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 13cb84ca4bf..5cf1a2baa46 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -934,6 +934,18 @@ _mesa_sprintf( char *str, const char *fmt, ... ) return r; } +/** Wrapper around vsnprintf() */ +int +_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) +{ + int r; + va_list args; + va_start( args, fmt ); + r = vsnprintf( str, size, fmt, args ); + va_end( args ); + return r; +} + /** Wrapper around printf(), using vsprintf() for the formatting. */ void _mesa_printf( const char *fmtString, ... ) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 453151ce0bd..13b571d1cbc 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -767,6 +767,9 @@ _mesa_strtod( const char *s, char **end ); extern int _mesa_sprintf( char *str, const char *fmt, ... ); +extern int +_mesa_snprintf( char *str, size_t size, const char *fmt, ... ); + extern void _mesa_printf( const char *fmtString, ... ); diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 8d213607172..bf04cfa99f5 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1996,7 +1996,7 @@ _slang_make_array_constructor(slang_assemble_ctx *A, slang_operation *oper) */ slang_variable *p = slang_variable_scope_grow(fun->parameters); char name[10]; - snprintf(name, sizeof(name), "p%d", i); + _mesa_snprintf(name, sizeof(name), "p%d", i); p->a_name = slang_atom_pool_atom(A->atoms, name); p->type.qualifier = SLANG_QUAL_CONST; p->type.specifier.type = baseType; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 1c0a7bbbd6e..d3b4e64b78d 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2099,8 +2099,8 @@ emit_var_ref(slang_emit_info *emitInfo, slang_ir_node *n) if (index < 0) { /* error */ char s[100]; - snprintf(s, sizeof(s), "Undefined variable '%s'", - (char *) n->Var->a_name); + _mesa_snprintf(s, sizeof(s), "Undefined variable '%s'", + (char *) n->Var->a_name); slang_info_log_error(emitInfo->log, s); return NULL; } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index b2fd9554a66..108d11c7df4 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -137,15 +137,15 @@ link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog) } if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_CENTROID)) { char msg[100]; - snprintf(msg, sizeof(msg), - "centroid modifier mismatch for '%s'", var->Name); + _mesa_snprintf(msg, sizeof(msg), + "centroid modifier mismatch for '%s'", var->Name); link_error(shProg, msg); return GL_FALSE; } if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_INVARIANT)) { char msg[100]; - snprintf(msg, sizeof(msg), - "invariant modifier mismatch for '%s'", var->Name); + _mesa_snprintf(msg, sizeof(msg), + "invariant modifier mismatch for '%s'", var->Name); link_error(shProg, msg); return GL_FALSE; } -- cgit v1.2.3 From f53d9913ac8efa5cefa428eb21f91298aca78293 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2009 12:37:58 -0800 Subject: i965: Add support for LRP in VPs. Bug #19226. --- src/mesa/drivers/dri/i965/brw_vs_emit.c | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index 71e2a95bfd9..27301629684 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -193,6 +193,7 @@ static void unalias1( struct brw_vs_compile *c, struct brw_reg tmp = brw_writemask(get_tmp(c), dst.dw1.bits.writemask); func(c, tmp, arg0); brw_MOV(p, dst, tmp); + release_tmp(c, tmp); } else { func(c, dst, arg0); @@ -214,12 +215,38 @@ static void unalias2( struct brw_vs_compile *c, struct brw_reg tmp = brw_writemask(get_tmp(c), dst.dw1.bits.writemask); func(c, tmp, arg0, arg1); brw_MOV(p, dst, tmp); + release_tmp(c, tmp); } else { func(c, dst, arg0, arg1); } } +static void unalias3( struct brw_vs_compile *c, + struct brw_reg dst, + struct brw_reg arg0, + struct brw_reg arg1, + struct brw_reg arg2, + void (*func)( struct brw_vs_compile *, + struct brw_reg, + struct brw_reg, + struct brw_reg, + struct brw_reg )) +{ + if ((dst.file == arg0.file && dst.nr == arg0.nr) || + (dst.file == arg1.file && dst.nr == arg1.nr) || + (dst.file == arg2.file && dst.nr == arg2.nr)) { + struct brw_compile *p = &c->func; + struct brw_reg tmp = brw_writemask(get_tmp(c), dst.dw1.bits.writemask); + func(c, tmp, arg0, arg1, arg2); + brw_MOV(p, dst, tmp); + release_tmp(c, tmp); + } + else { + func(c, dst, arg0, arg1, arg2); + } +} + static void emit_sop( struct brw_compile *p, struct brw_reg dst, struct brw_reg arg0, @@ -590,6 +617,18 @@ static void emit_lit_noalias( struct brw_vs_compile *c, brw_ENDIF(p, if_insn); } +static void emit_lrp_noalias(struct brw_vs_compile *c, + struct brw_reg dst, + struct brw_reg arg0, + struct brw_reg arg1, + struct brw_reg arg2) +{ + struct brw_compile *p = &c->func; + + brw_ADD(p, dst, negate(arg0), brw_imm_f(1.0)); + brw_MUL(p, brw_null_reg(), dst, arg2); + brw_MAC(p, dst, arg0, arg1); +} /** 3 or 4-component vector normalization */ static void emit_nrm( struct brw_vs_compile *c, @@ -1077,6 +1116,9 @@ void brw_vs_emit(struct brw_vs_compile *c ) case OPCODE_LIT: unalias1(c, dst, args[0], emit_lit_noalias); break; + case OPCODE_LRP: + unalias3(c, dst, args[0], args[1], args[2], emit_lrp_noalias); + break; case OPCODE_MAD: brw_MOV(p, brw_acc_reg(), args[2]); brw_MAC(p, dst, args[0], args[1]); -- cgit v1.2.3 From 8112c9e2cc5b27a2b7fd1641c03d3660f992dabf Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2009 12:38:34 -0800 Subject: i965: Note when we drop saturate mode on the floor in a VP. --- src/mesa/drivers/dri/i965/brw_vs_emit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index 27301629684..2084480e898 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -1064,6 +1064,11 @@ void brw_vs_emit(struct brw_vs_compile *c ) else dst = get_dst(c, inst->DstReg); + if (inst->SaturateMode != SATURATE_OFF) { + _mesa_problem(NULL, "Unsupported saturate %d in vertex shader", + inst->SaturateMode); + } + switch (inst->Opcode) { case OPCODE_ABS: brw_MOV(p, dst, brw_abs(args[0])); -- cgit v1.2.3 From 95fa98d61a857448e690a0671b2e1e1d2873f0ec Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 15:06:06 -0700 Subject: i965: init dst reg RelAddr field to zero --- src/mesa/drivers/dri/i965/brw_wm_fp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index 7f7b957cbe8..cb1e40097bd 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -122,10 +122,11 @@ static struct prog_dst_register dst_reg(GLuint file, GLuint idx) reg.File = file; reg.Index = idx; reg.WriteMask = WRITEMASK_XYZW; + reg.RelAddr = 0; reg.CondMask = 0; reg.CondSwizzle = 0; - reg.pad = 0; reg.CondSrc = 0; + reg.pad = 0; return reg; } -- cgit v1.2.3 From d1860bcd0ade44a884ac1b7e0c5b2bef8ed6afcb Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 18:22:56 -0700 Subject: glsl: check that the fragment shader does not write both gl_FragColor and gl_FragData[] --- src/mesa/shader/slang/slang_link.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 108d11c7df4..26f5d61e048 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -645,6 +645,17 @@ _slang_link(GLcontext *ctx, } } + /* check that gl_FragColor and gl_FragData are not both written to */ + if (shProg->FragmentProgram) { + GLbitfield outputsWritten = shProg->FragmentProgram->Base.OutputsWritten; + if ((outputsWritten & ((1 << FRAG_RESULT_COLR))) && + (outputsWritten >= (1 << FRAG_RESULT_DATA0))) { + link_error(shProg, "Fragment program cannot write both gl_FragColor" + " and gl_FragData[].\n"); + return; + } + } + if (fragProg && shProg->FragmentProgram) { /* Compute initial program's TexturesUsed info */ -- cgit v1.2.3 From 176464b14b8ec2a248aed95df087e47749c851fa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 18:41:54 -0700 Subject: glsl: bump up MAX_FOR_LOOP_UNROLL_COMPLEXITY --- src/mesa/shader/slang/slang_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index bf04cfa99f5..ba1c955a1ae 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -68,7 +68,7 @@ const GLuint MAX_FOR_LOOP_UNROLL_BODY_SIZE = 50; * and the size of the body. So long-ish loops with very simple bodies * can be unrolled, as well as short loops with larger bodies. */ -const GLuint MAX_FOR_LOOP_UNROLL_COMPLEXITY = 200; +const GLuint MAX_FOR_LOOP_UNROLL_COMPLEXITY = 256; -- cgit v1.2.3 From 9629be5e07dc1d2b69cf7a761a6bb3ac0ec26453 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 18:44:00 -0700 Subject: glsl: pass GLcontext::Extension info down into GLSL preprocessor Now the #extension directives can be handled properly. --- src/mesa/shader/slang/slang_compile.c | 14 ++++-- src/mesa/shader/slang/slang_preprocess.c | 80 +++++++++++++++++++++----------- src/mesa/shader/slang/slang_preprocess.h | 6 +-- 3 files changed, 65 insertions(+), 35 deletions(-) diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index d8aefd64950..c150931ead8 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2474,7 +2474,8 @@ 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, - struct gl_shader *shader) + struct gl_shader *shader, + const struct gl_extensions *extensions) { byte *prod; GLuint size, start, version; @@ -2502,7 +2503,8 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, /* Now preprocess the source string. */ slang_string_init(&preprocessed); - if (!_slang_preprocess_directives(&preprocessed, &source[start], infolog)) { + if (!_slang_preprocess_directives(&preprocessed, &source[start], + infolog, extensions)) { slang_string_free(&preprocessed); slang_info_log_error(infolog, "failed to preprocess the source."); return GL_FALSE; @@ -2575,7 +2577,8 @@ static const byte slang_vertex_builtin_gc[] = { static GLboolean compile_object(grammar * id, const char *source, slang_code_object * object, slang_unit_type type, slang_info_log * infolog, - struct gl_shader *shader) + struct gl_shader *shader, + const struct gl_extensions *extensions) { slang_code_unit *builtins = NULL; GLuint base_version = 110; @@ -2674,7 +2677,7 @@ compile_object(grammar * id, const char *source, slang_code_object * object, /* compile the actual shader - pass-in built-in library for external shader */ return compile_with_grammar(*id, source, &object->unit, type, infolog, - builtins, shader); + builtins, shader, extensions); } @@ -2697,7 +2700,8 @@ compile_shader(GLcontext *ctx, slang_code_object * object, _slang_code_object_dtr(object); _slang_code_object_ctr(object); - success = compile_object(&id, shader->Source, object, type, infolog, shader); + success = compile_object(&id, shader->Source, object, type, infolog, shader, + &ctx->Extensions); if (id != 0) grammar_destroy(id); if (!success) diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c index 7d971627f57..76e757cb381 100644 --- a/src/mesa/shader/slang/slang_preprocess.c +++ b/src/mesa/shader/slang/slang_preprocess.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, 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"), @@ -475,52 +475,63 @@ pp_cond_stack_reevaluate (pp_cond_stack *self) self->top->effective = self->top->current && self->top[1].effective; } -/* + +/** * Extension enables through #extension directive. * NOTE: Currently, only enable/disable state is stored. */ - typedef struct { - GLboolean MESA_shader_debug; /* GL_MESA_shader_debug enable */ - GLboolean ARB_texture_rectangle; /* GL_ARB_texture_rectangle enable */ + GLboolean ARB_draw_buffers; + GLboolean ARB_texture_rectangle; } pp_ext; -/* + +/** * Disable all extensions. Called at startup and on #extension all: disable. */ static GLvoid -pp_ext_disable_all (pp_ext *self) +pp_ext_disable_all(pp_ext *self) { - self->MESA_shader_debug = GL_FALSE; + _mesa_memset(self, 0, sizeof(self)); } + +/** + * Called during preprocessor initialization to set the initial enable/disable + * state of extensions. + */ static GLvoid -pp_ext_init (pp_ext *self) +pp_ext_init(pp_ext *self, const struct gl_extensions *extensions) { pp_ext_disable_all (self); - self->ARB_texture_rectangle = GL_TRUE; - /* Other initialization code goes here. */ + if (extensions->ARB_draw_buffers) + self->ARB_draw_buffers = GL_TRUE; + if (extensions->NV_texture_rectangle) + self->ARB_texture_rectangle = GL_TRUE; } +/** + * Called in response to #extension directives to enable/disable + * the named extension. + */ static GLboolean -pp_ext_set (pp_ext *self, const char *name, GLboolean enable) +pp_ext_set(pp_ext *self, const char *name, GLboolean enable) { - if (_mesa_strcmp (name, "MESA_shader_debug") == 0) - self->MESA_shader_debug = enable; + if (_mesa_strcmp (name, "GL_ARB_draw_buffers") == 0) + self->ARB_draw_buffers = enable; else if (_mesa_strcmp (name, "GL_ARB_texture_rectangle") == 0) self->ARB_texture_rectangle = enable; - /* Next extension name tests go here. */ else return GL_FALSE; return GL_TRUE; } -/* - * The state of preprocessor: current line, file and version number, list of all defined macros - * and the #if/#endif context. - */ +/** + * The state of preprocessor: current line, file and version number, list + * of all defined macros and the #if/#endif context. + */ typedef struct { GLint line; @@ -533,7 +544,8 @@ typedef struct } pp_state; static GLvoid -pp_state_init (pp_state *self, slang_info_log *elog) +pp_state_init (pp_state *self, slang_info_log *elog, + const struct gl_extensions *extensions) { self->line = 0; self->file = 1; @@ -543,7 +555,7 @@ pp_state_init (pp_state *self, slang_info_log *elog) self->version = 110; #endif pp_symbols_init (&self->symbols); - pp_ext_init (&self->ext); + pp_ext_init (&self->ext, extensions); self->elog = elog; /* Initialize condition stack and create the global context. */ @@ -851,8 +863,10 @@ parse_if (slang_string *output, const byte *prod, GLuint *pi, GLint *result, pp_ #define BEHAVIOR_DISABLE 4 static GLboolean -preprocess_source (slang_string *output, const char *source, grammar pid, grammar eid, - slang_info_log *elog) +preprocess_source (slang_string *output, const char *source, + grammar pid, grammar eid, + slang_info_log *elog, + const struct gl_extensions *extensions) { static const char *predefined[] = { "__FILE__", @@ -873,7 +887,7 @@ preprocess_source (slang_string *output, const char *source, grammar pid, gramma return GL_FALSE; } - pp_state_init (&state, elog); + pp_state_init (&state, elog, extensions); /* add the predefined symbols to the symbol table */ for (i = 0; predefined[i]; i++) { @@ -1196,8 +1210,20 @@ error: return GL_FALSE; } + +/** + * Run preprocessor on source code. + * \param extensions indicates which GL extensions are enabled + * \param output the post-process results + * \param input the input text + * \param elog log to record warnings, errors + * \return GL_TRUE for success, GL_FALSE for error + */ GLboolean -_slang_preprocess_directives (slang_string *output, const char *input, slang_info_log *elog) +_slang_preprocess_directives(slang_string *output, + const char *input, + slang_info_log *elog, + const struct gl_extensions *extensions) { grammar pid, eid; GLboolean success; @@ -1213,7 +1239,7 @@ _slang_preprocess_directives (slang_string *output, const char *input, slang_inf grammar_destroy (pid); return GL_FALSE; } - success = preprocess_source (output, input, pid, eid, elog); + success = preprocess_source (output, input, pid, eid, elog, extensions); grammar_destroy (eid); grammar_destroy (pid); return success; diff --git a/src/mesa/shader/slang/slang_preprocess.h b/src/mesa/shader/slang/slang_preprocess.h index d8eb12e4ff2..dd996a6314b 100644 --- a/src/mesa/shader/slang/slang_preprocess.h +++ b/src/mesa/shader/slang/slang_preprocess.h @@ -33,8 +33,8 @@ extern GLboolean _slang_preprocess_version (const char *, GLuint *, GLuint *, slang_info_log *); extern GLboolean -_slang_preprocess_directives (slang_string *output, const char *input, - slang_info_log *); - +_slang_preprocess_directives(slang_string *output, const char *input, + slang_info_log *, + const struct gl_extensions *extensions); #endif /* SLANG_PREPROCESS_H */ -- cgit v1.2.3 From bc7d2c4f51c56787b261e6ab6f9a77d39c3493e1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 18:44:41 -0700 Subject: mesa: additional case in file_string() --- src/mesa/shader/prog_print.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 9215ed7abf6..0ec13a415c4 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -71,6 +71,8 @@ file_string(enum register_file f, gl_prog_print_mode mode) return "ADDR"; case PROGRAM_SAMPLER: return "SAMPLER"; + case PROGRAM_UNDEFINED: + return "UNDEFINED"; default: return "Unknown program file!"; } -- cgit v1.2.3 From f68f94c2bc950405d4c91a1e5582a35ff4b15bdf Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 18:45:49 -0700 Subject: i965: allow gl_FragData[0] usage when there's only one color buffer If gl_FragData[0] is written but not gl_FragCOlor, use the former. --- src/mesa/drivers/dri/i965/brw_wm_fp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index cb1e40097bd..f4583877aa5 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -864,9 +864,9 @@ static void emit_fog( struct brw_wm_compile *c ) static void emit_fb_write( struct brw_wm_compile *c ) { - struct prog_src_register outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_COLR); struct prog_src_register payload_r0_depth = src_reg(PROGRAM_PAYLOAD, PAYLOAD_DEPTH); struct prog_src_register outdepth = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_DEPR); + struct prog_src_register outcolor; GLuint i; struct prog_instruction *inst, *last_inst; @@ -890,7 +890,14 @@ static void emit_fb_write( struct brw_wm_compile *c ) } } last_inst->Sampler |= 1; //eot - }else { + } + else { + /* if gl_FragData[0] is written, use it, else use gl_FragColor */ + if (c->fp->program.Base.OutputsWritten & (1 << FRAG_RESULT_DATA0)) + outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_DATA0); + else + outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_COLR); + inst = emit_op(c, WM_FB_WRITE, dst_mask(dst_undef(),0), 0, 0, 0, outcolor, payload_r0_depth, outdepth); inst->Sampler = 1|(0<<1); -- cgit v1.2.3 From b9b482bd8de366289158a916e16414c5a74819c9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2009 13:52:51 -0800 Subject: i965: Remove dead brw_vs_tnl.c --- src/mesa/drivers/dri/i965/Makefile | 1 - src/mesa/drivers/dri/i965/brw_state.h | 1 - src/mesa/drivers/dri/i965/brw_vs_tnl.c | 59 ---------------------------------- 3 files changed, 61 deletions(-) delete mode 100644 src/mesa/drivers/dri/i965/brw_vs_tnl.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 005460f3547..37a470f2e24 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -68,7 +68,6 @@ DRIVER_SOURCES = \ brw_vs_constval.c \ brw_vs_emit.c \ brw_vs_state.c \ - brw_vs_tnl.c \ brw_vtbl.c \ brw_wm.c \ brw_wm_debug.c \ diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index bb22c03eeb6..df839c5b300 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -83,7 +83,6 @@ const struct brw_tracked_state brw_wm_unit; const struct brw_tracked_state brw_psp_urb_cbs; -const struct brw_tracked_state brw_active_vertprog; const struct brw_tracked_state brw_pipe_control; const struct brw_tracked_state brw_clear_surface_cache; diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c deleted file mode 100644 index eacc289f1f1..00000000000 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 2005 Tungsten Graphics 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 - * TUNGSTEN GRAPHICS 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 t_vp_build.c - * Create a vertex program to execute the current fixed function T&L pipeline. - * \author Keith Whitwell - */ - - -#include "main/glheader.h" -#include "main/macros.h" -#include "main/enums.h" -#include "brw_vs.h" -#include "brw_state.h" - - -static void prepare_active_vertprog( struct brw_context *brw ) -{ - const struct gl_vertex_program *prev = brw->vertex_program; - - brw->vertex_program = brw->attribs.VertexProgram->_Current; - - if (brw->vertex_program != prev) - brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM; -} - - - -const struct brw_tracked_state brw_active_vertprog = { - .dirty = { - .mesa = _NEW_PROGRAM, - .brw = 0, - .cache = 0 - }, - .prepare = prepare_active_vertprog -}; -- cgit v1.2.3 From 8fb727548a652c47d8cf9593e2ae412ef2040119 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2009 14:09:07 -0800 Subject: mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs. There was a note in state.c about _Active deserving to die, and there were potential issues with it due to i965 forgetting to set _UseTexEnvProgram. Removing both simplifies things. Reviewed-by: Brian Paul --- src/mesa/drivers/dri/i915/i915_context.c | 1 - src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/intel/intel_pixel_draw.c | 25 ++----------------------- src/mesa/main/context.c | 1 - src/mesa/main/mtypes.h | 2 -- src/mesa/main/state.c | 11 ----------- src/mesa/swrast/s_aalinetemp.h | 2 +- src/mesa/tnl/t_context.c | 2 +- 8 files changed, 5 insertions(+), 41 deletions(-) diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 9bff74294d8..3d6af38057e 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -171,7 +171,6 @@ i915CreateContext(const __GLcontextModes * mesaVis, ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* I don't think we have one */ ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; - ctx->FragmentProgram._UseTexEnvProgram = GL_TRUE; driInitExtensions(ctx, i915_extensions, GL_FALSE); diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index 9d04358e4f3..a53f120a817 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -569,7 +569,7 @@ i915_update_fog(GLcontext * ctx) GLboolean enabled; GLboolean try_pixel_fog; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Current) { /* Pull in static fog state from program */ mode = ctx->FragmentProgram._Current->FogOption; enabled = (mode != GL_NONE); diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c index 0d66935ad27..2af839b8031 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c @@ -386,27 +386,6 @@ intelDrawPixels(GLcontext * ctx, if (INTEL_DEBUG & DEBUG_PIXEL) _mesa_printf("%s: fallback to swrast\n", __FUNCTION__); - if (ctx->FragmentProgram._Current == ctx->FragmentProgram._TexEnvProgram) { - /* - * We don't want the i915 texenv program to be applied to DrawPixels. - * This is really just a performance optimization (mesa will other- - * wise happily run the fragment program on each pixel in the image). - */ - struct gl_fragment_program *fpSave = ctx->FragmentProgram._Current; - /* can't just set current frag prog to 0 here as on buffer resize - we'll get new state checks which will segfault. Remains a hack. */ - ctx->FragmentProgram._Current = NULL; - ctx->FragmentProgram._UseTexEnvProgram = GL_FALSE; - ctx->FragmentProgram._Active = GL_FALSE; - _swrast_DrawPixels( ctx, x, y, width, height, format, type, - unpack, pixels ); - ctx->FragmentProgram._Current = fpSave; - ctx->FragmentProgram._UseTexEnvProgram = GL_TRUE; - ctx->FragmentProgram._Active = GL_TRUE; - _swrast_InvalidateState(ctx, _NEW_PROGRAM); - } - else { - _swrast_DrawPixels( ctx, x, y, width, height, format, type, - unpack, pixels ); - } + _swrast_DrawPixels(ctx, x, y, width, height, format, type, + unpack, pixels); } diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b59ad355fb2..98c23bbd3a5 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1225,7 +1225,6 @@ _mesa_initialize_context(GLcontext *ctx, ctx->FragmentProgram._MaintainTexEnvProgram = (_mesa_getenv("MESA_TEX_PROG") != NULL); - ctx->FragmentProgram._UseTexEnvProgram = ctx->FragmentProgram._MaintainTexEnvProgram; ctx->VertexProgram._MaintainTnlProgram = (_mesa_getenv("MESA_TNL_PROG") != NULL); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 9cb6159f003..3eca8a85f95 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2011,8 +2011,6 @@ struct gl_fragment_program_state /** Should fixed-function texturing be implemented with a fragment prog? */ GLboolean _MaintainTexEnvProgram; - GLboolean _UseTexEnvProgram; - GLboolean _Active; /**< Use internal texenv program? */ /** Program to emulate fixed-function texture env/combine (see above) */ struct gl_fragment_program *_TexEnvProgram; diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index df1d1978584..6fe54c753f4 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -254,17 +254,6 @@ update_program(GLcontext *ctx) _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL); } - /* XXX: get rid of _Active flag. - */ -#if 1 - ctx->FragmentProgram._Active = ctx->FragmentProgram._Enabled; - if (ctx->FragmentProgram._MaintainTexEnvProgram && - !ctx->FragmentProgram._Enabled) { - if (ctx->FragmentProgram._UseTexEnvProgram) - ctx->FragmentProgram._Active = GL_TRUE; - } -#endif - /* Let the driver know what's happening: */ if (ctx->FragmentProgram._Current != prevFP && ctx->Driver.BindProgram) { diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index ca08203d831..42ffe9f20c1 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -76,7 +76,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) ATTRIB_LOOP_BEGIN GLfloat (*attribArray)[4] = line->span.array->attribs[attr]; if (attr >= FRAG_ATTRIB_TEX0 && attr < FRAG_ATTRIB_VAR0 - && !ctx->FragmentProgram._Active) { + && !ctx->FragmentProgram._Current) { /* texcoord w/ divide by Q */ const GLuint unit = attr - FRAG_ATTRIB_TEX0; const GLfloat invQ = solve_plane_recip(fx, fy, line->attrPlane[attr][3]); diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 8977fadcca2..5e2a58249ec 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -137,7 +137,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) /* fixed-function fog */ RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG ); } - else if (ctx->FragmentProgram._Active || ctx->FragmentProgram._Current) { + else if (ctx->FragmentProgram._Current) { struct gl_fragment_program *fp = ctx->FragmentProgram._Current; if (fp) { if (fp->FogOption != GL_NONE || (fp->Base.InputsRead & FRAG_BIT_FOGC)) { -- cgit v1.2.3 From 6d2cf395f401b53da1c2fc4485a297fd975637c6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2009 14:26:11 -0800 Subject: i965: Remove worrisome comment about _NEW_PROGRAM signaling fp change. Everything now depends on either BRW_NEW_FRAGMENT_PROGRAM or BRW_NEW_VERTEX_PROGRAM. --- src/mesa/drivers/dri/i965/brw_state_upload.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 5124535f2a6..4845859b3e8 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -314,12 +314,8 @@ void brw_validate_state( struct brw_context *brw ) state->brw |= ~0; } - /* texenv program needs to notify us somehow when this happens: - * Some confusion about which state flag should represent this change. - */ if (brw->fragment_program != brw->attribs.FragmentProgram->_Current) { brw->fragment_program = brw->attribs.FragmentProgram->_Current; - brw->state.dirty.mesa |= _NEW_PROGRAM; brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM; } -- cgit v1.2.3 From 83a74521cfd2e81dd98ee1d84aff42a660613740 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2009 16:56:02 -0800 Subject: i965: Fix GLSL FS DPH to return the right value instead of src0.w * src1.w. --- src/mesa/drivers/dri/i965/brw_wm_glsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index d43e326f7d1..942ebe1ed4e 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -623,7 +623,7 @@ static void emit_dph(struct brw_wm_compile *c, brw_MAC(p, brw_null_reg(), src0[1], src1[1]); brw_MAC(p, dst, src0[2], src1[2]); brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0); - brw_ADD(p, dst, src0[3], src1[3]); + brw_ADD(p, dst, dst, src1[3]); brw_set_saturate(p, 0); } -- cgit v1.2.3 From 19c877c3278f5bfc48f55b2ee35ec5f6769e4c90 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Jan 2009 12:31:14 -0700 Subject: mesa: fix off-by-one bug in _mesa_delete_instructions() --- src/mesa/shader/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 738891a0293..d114828ec6a 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -571,7 +571,7 @@ _mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count) for (i = 0; i < prog->NumInstructions; i++) { struct prog_instruction *inst = prog->Instructions + i; if (inst->BranchTarget > 0) { - if (inst->BranchTarget >= start) { + if (inst->BranchTarget > start) { inst->BranchTarget -= count; } } -- cgit v1.2.3 From 730a407ca288bdd0120b9bb436ae716bfb9415f5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 15:32:02 -0700 Subject: glsl: fix broken +=, -=, *=, /= operators These functions need to return the final computed value. Now expressions such as a = (b += c) work properly. Also, no need to use __asm intrinsics in these functions. The resulting code is the same when using ordinary arithmetic operators and is more legible. --- src/mesa/shader/slang/library/slang_core.gc | 569 ++++++++------- src/mesa/shader/slang/library/slang_core_gc.h | 954 +++++++++++++------------- 2 files changed, 786 insertions(+), 737 deletions(-) diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 10a6bb5cb15..748add4bc8f 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1207,370 +1207,381 @@ float dot(const vec4 a, const vec4 b) //// int assignment operators -void __operator += (inout int a, const int b) +int __operator += (inout int a, const int b) { - __asm vec4_add a, a, b; + a = a + b; + return a; } -void __operator -= (inout int a, const int b) +int __operator -= (inout int a, const int b) { - __asm vec4_subtract a, a, b; + a = a - b; + return a; } -void __operator *= (inout int a, const int b) +int __operator *= (inout int a, const int b) { - __asm vec4_multiply a, a, b; + a = a * b; + return a; } -void __operator /= (inout int a, const int b) +int __operator /= (inout int a, const int b) { - float invB; - __asm float_rcp invB, b; - __asm vec4_multiply a, a, invB; - __asm vec4_to_ivec4 a, a; + a = a / b; + return a; } //// ivec2 assignment operators -void __operator += (inout ivec2 v, const ivec2 u) +ivec2 __operator += (inout ivec2 v, const ivec2 u) { - __asm vec4_add v, v, u; + v = v + u; + return v; } -void __operator -= (inout ivec2 v, const ivec2 u) +ivec2 __operator -= (inout ivec2 v, const ivec2 u) { - __asm vec4_subtract v, v, u; + v = v - u; + return v; } -void __operator *= (inout ivec2 v, const ivec2 u) +ivec2 __operator *= (inout ivec2 v, const ivec2 u) { - __asm vec4_multiply v, v, u; + v = v * u; + return v; } -void __operator /= (inout ivec2 v, const ivec2 u) +ivec2 __operator /= (inout ivec2 v, const ivec2 u) { - ivec2 inv, z; - __asm float_rcp inv.x, u.x; - __asm float_rcp inv.y, u.y; - __asm vec4_multiply z, v, inv; - __asm vec4_to_ivec4 v, z; + v = v / u; + return v; } //// ivec3 assignment operators -void __operator += (inout ivec3 v, const ivec3 u) +ivec3 __operator += (inout ivec3 v, const ivec3 u) { - __asm vec4_add v, v, u; + v = v + u; + return v; } -void __operator -= (inout ivec3 v, const ivec3 u) +ivec3 __operator -= (inout ivec3 v, const ivec3 u) { - __asm vec4_subtract v, v, u; + v = v - u; + return v; } -void __operator *= (inout ivec3 v, const ivec3 u) +ivec3 __operator *= (inout ivec3 v, const ivec3 u) { - __asm vec4_multiply v, v, u; + v = v * u; + return v; } -void __operator /= (inout ivec3 v, const ivec3 u) +ivec3 __operator /= (inout ivec3 v, const ivec3 u) { - ivec3 inv, z; - __asm float_rcp inv.x, u.x; - __asm float_rcp inv.y, u.y; - __asm vec4_multiply z, v, inv; - __asm vec4_to_ivec4 v, z; + v = v / u; + return v; } //// ivec4 assignment operators -void __operator += (inout ivec4 v, const ivec4 u) +ivec4 __operator += (inout ivec4 v, const ivec4 u) { - __asm vec4_add v, v, u; + v = v + u; + return v; } -void __operator -= (inout ivec4 v, const ivec4 u) +ivec4 __operator -= (inout ivec4 v, const ivec4 u) { - __asm vec4_subtract v, v, u; + v = v - u; + return v; } -void __operator *= (inout ivec4 v, const ivec4 u) +ivec4 __operator *= (inout ivec4 v, const ivec4 u) { - __asm vec4_multiply v, v, u; + v = v * u; + return v; } -void __operator /= (inout ivec4 v, const ivec4 u) +ivec4 __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 vec4_to_ivec4 v, z; + v = v / u; + return v; } //// float assignment operators -void __operator += (inout float a, const float b) +float __operator += (inout float a, const float b) { - __asm vec4_add a.x, a.x, b.x; + a = a + b; + return a; } -void __operator -= (inout float a, const float b) +float __operator -= (inout float a, const float b) { - __asm vec4_subtract a.x, a, b; + a = a - b; + return a; } -void __operator *= (inout float a, const float b) +float __operator *= (inout float a, const float b) { - __asm vec4_multiply a.x, a, b; + a = a * b; + return a; } -void __operator /= (inout float a, const float b) +float __operator /= (inout float a, const float b) { - float w; // = 1 / b - __asm float_rcp w.x, b; - __asm vec4_multiply a.x, a, w; + a = a / b; + return a; } //// vec2 assignment operators -void __operator += (inout vec2 v, const vec2 u) +vec2 __operator += (inout vec2 v, const vec2 u) { - __asm vec4_add v.xy, v.xy, u.xy; + v + v + u; + return v; } -void __operator -= (inout vec2 v, const vec2 u) +vec2 __operator -= (inout vec2 v, const vec2 u) { - __asm vec4_subtract v.xy, v.xy, u.xy; + v = v - u; + return v; } -void __operator *= (inout vec2 v, const vec2 u) +vec2 __operator *= (inout vec2 v, const vec2 u) { - __asm vec4_multiply v.xy, v.xy, u.xy; + v = v * u; + return v; } -void __operator /= (inout vec2 v, const vec2 u) +vec2 __operator /= (inout vec2 v, const vec2 u) { - 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; + v = v / u; + return v; } //// vec3 assignment operators -void __operator += (inout vec3 v, const vec3 u) +vec3 __operator += (inout vec3 v, const vec3 u) { - __asm vec4_add v.xyz, v, u; + v = v + u; + return v; } -void __operator -= (inout vec3 v, const vec3 u) +vec3 __operator -= (inout vec3 v, const vec3 u) { - __asm vec4_subtract v.xyz, v, u; + v = v - u; + return v; } -void __operator *= (inout vec3 v, const vec3 u) +vec3 __operator *= (inout vec3 v, const vec3 u) { - __asm vec4_multiply v.xyz, v, u; + v = v * u; + return v; } -void __operator /= (inout vec3 v, const vec3 u) +vec3 __operator /= (inout vec3 v, const vec3 u) { - 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; + v = v / u; + return v; } //// vec4 assignment operators -void __operator += (inout vec4 v, const vec4 u) +vec4 __operator += (inout vec4 v, const vec4 u) { - __asm vec4_add v, v, u; + v = v + u; + return v; } -void __operator -= (inout vec4 v, const vec4 u) +vec4 __operator -= (inout vec4 v, const vec4 u) { - __asm vec4_subtract v, v, u; + v = v - u; + return v; } -void __operator *= (inout vec4 v, const vec4 u) +vec4 __operator *= (inout vec4 v, const vec4 u) { - __asm vec4_multiply v, v, u; + v = v * u; + return v; } -void __operator /= (inout vec4 v, const vec4 u) +vec4 __operator /= (inout vec4 v, const vec4 u) { - 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; + v = v / u; + return v; } //// ivec2/int assignment operators -void __operator += (inout ivec2 v, const int a) +ivec2 __operator += (inout ivec2 v, const int a) { - __asm vec4_add v.xy, v.xy, a; + v = v + ivec2(a); + return v; } -void __operator -= (inout ivec2 v, const int a) +ivec2 __operator -= (inout ivec2 v, const int a) { - __asm vec4_subtract v.xy, v.xy, a; + v = v - ivec2(a); + return v; } -void __operator *= (inout ivec2 v, const int a) +ivec2 __operator *= (inout ivec2 v, const int a) { - __asm vec4_multiply v.xy, v.xy, a; - v.x *= a; - v.y *= a; + v = v * ivec2(a); + return v; } -void __operator /= (inout ivec2 v, const int a) +ivec2 __operator /= (inout ivec2 v, const int a) { -// XXX rcp - v.x /= a; - v.y /= a; + v = v / ivec2(a); + return v; } //// ivec3/int assignment operators -void __operator += (inout ivec3 v, const int a) +ivec3 __operator += (inout ivec3 v, const int a) { - __asm vec4_add v.xyz, v.xyz, a; + v = v + ivec3(a); + return v; } -void __operator -= (inout ivec3 v, const int a) +ivec3 __operator -= (inout ivec3 v, const int a) { - __asm vec4_subtract v.xyz, v.xyz, a; + v = v - ivec3(a); + return v; } -void __operator *= (inout ivec3 v, const int a) +ivec3 __operator *= (inout ivec3 v, const int a) { - __asm vec4_multiply v.xyz, v.xyz, a; + v = v * ivec3(a); + return v; } -void __operator /= (inout ivec3 v, const int a) +ivec4 __operator /= (inout ivec3 v, const int a) { - // XXX rcp - v.x /= a; - v.y /= a; - v.z /= a; + v = v / ivec3(a); + return v; } //// ivec4/int assignment operators -void __operator += (inout ivec4 v, const int a) +ivec4 __operator += (inout ivec4 v, const int a) { - __asm vec4_add v, v, a; + v = v + ivec4(a); + return v; } -void __operator -= (inout ivec4 v, const int a) +ivec4 __operator -= (inout ivec4 v, const int a) { - __asm vec4_subtract v, v, a; + v = v - ivec4(a); + return v; } -void __operator *= (inout ivec4 v, const int a) +ivec4 __operator *= (inout ivec4 v, const int a) { - __asm vec4_multiply v, v, a; + v = v * ivec4(a); + return v; } -void __operator /= (inout ivec4 v, const int a) +ivec4 __operator /= (inout ivec4 v, const int a) { - v.x /= a; - v.y /= a; - v.z /= a; - v.w /= a; + v = v / ivec4(a); + return v; } //// vec2/float assignment operators -void __operator += (inout vec2 v, const float a) +vec2 __operator += (inout vec2 v, const float a) { - __asm vec4_add v.xy, v, a; + v = v + vec2(a); + return v; } -void __operator -= (inout vec2 v, const float a) +vec2 __operator -= (inout vec2 v, const float a) { - __asm vec4_subtract v.xy, v, a; + v = v - vec2(a); + return v; } -void __operator *= (inout vec2 v, const float a) +vec2 __operator *= (inout vec2 v, const float a) { - __asm vec4_multiply v.xy, v, a; + v = v * vec2(a); + return v; } -void __operator /= (inout vec2 v, const float a) +vec2 __operator /= (inout vec2 v, const float a) { - float invA; - __asm float_rcp invA, a; - __asm vec4_multiply v.xy, v.xy, invA; + v = v / vec2(a); + return v; } //// vec3/float assignment operators -void __operator += (inout vec3 v, const float a) +vec3 __operator += (inout vec3 v, const float a) { - __asm vec4_add v.xyz, v, a; + v = v + vec3(a); + return v; } -void __operator -= (inout vec3 v, const float a) +vec3 __operator -= (inout vec3 v, const float a) { - __asm vec4_subtract v.xyz, v, a; + v = v - vec3(a); + return v; } -void __operator *= (inout vec3 v, const float a) +vec3 __operator *= (inout vec3 v, const float a) { - __asm vec4_multiply v.xyz, v, a; + v = v * vec3(a); + return v; } -void __operator /= (inout vec3 v, const float a) +vec3 __operator /= (inout vec3 v, const float a) { - float invA; - __asm float_rcp invA, a; - __asm vec4_multiply v.xyz, v.xyz, invA; + v = v / vec3(a); + return v; } //// vec4/float assignment operators -void __operator += (inout vec4 v, const float a) +vec4 __operator += (inout vec4 v, const float a) { - __asm vec4_add v, v, a; + v = v + vec4(a); + return v; } -void __operator -= (inout vec4 v, const float a) +vec4 __operator -= (inout vec4 v, const float a) { - __asm vec4_subtract v, v, a; + v = v - vec4(a); + return v; } -void __operator *= (inout vec4 v, const float a) +vec4 __operator *= (inout vec4 v, const float a) { - __asm vec4_multiply v, v, a; + v = v * vec4(a); + return v; } -void __operator /= (inout vec4 v, const float a) +vec4 __operator /= (inout vec4 v, const float a) { - float invA; - __asm float_rcp invA, a; - __asm vec4_multiply v, v, invA; + v = v / vec4(a); + return v; } @@ -1896,187 +1907,239 @@ vec4 __operator * (const vec4 v, const mat4 m) //// mat2 assignment operators -void __operator += (inout mat2 m, const mat2 n) +mat2 __operator += (inout mat2 m, const mat2 n) { - m[0] += n[0]; - m[1] += n[1]; + m[0] = m[0] + n[0]; + m[1] = m[1] + n[1]; + return m; } -void __operator -= (inout mat2 m, const mat2 n) +mat2 __operator -= (inout mat2 m, const mat2 n) { - m[0] -= n[0]; - m[1] -= n[1]; + m[0] = m[0] - n[0]; + m[1] = m[1] - n[1]; + return m; } -void __operator *= (inout mat2 m, const mat2 n) +mat2 __operator *= (inout mat2 m, const mat2 n) { - m = m * n; + m = m * n; + return m; } -void __operator /= (inout mat2 m, const mat2 n) +mat2 __operator /= (inout mat2 m, const mat2 n) { - m[0] /= n[0]; - m[1] /= n[1]; + m[0] = m[0] / n[0]; + m[1] = m[1] / n[1]; + return m; } //// mat3 assignment operators -void __operator += (inout mat3 m, const mat3 n) +mat3 __operator += (inout mat3 m, const mat3 n) { - m[0] += n[0]; - m[1] += n[1]; - m[2] += n[2]; + m[0] = m[0] + n[0]; + m[1] = m[1] + n[1]; + m[2] = m[2] + n[2]; + return m; } -void __operator -= (inout mat3 m, const mat3 n) +mat3 __operator -= (inout mat3 m, const mat3 n) { - m[0] -= n[0]; - m[1] -= n[1]; - m[2] -= n[2]; + m[0] = m[0] - n[0]; + m[1] = m[1] - n[1]; + m[2] = m[2] - n[2]; + return m; } -void __operator *= (inout mat3 m, const mat3 n) +mat3 __operator *= (inout mat3 m, const mat3 n) { - m = m * n; + m = m * n; + return m; } -void __operator /= (inout mat3 m, const mat3 n) +mat3 __operator /= (inout mat3 m, const mat3 n) { - m[0] /= n[0]; - m[1] /= n[1]; - m[2] /= n[2]; + m[0] = m[0] / n[0]; + m[1] = m[1] / n[1]; + m[2] = m[2] / n[2]; + return m; } // mat4 assignment operators -void __operator += (inout mat4 m, const mat4 n) +mat4 __operator += (inout mat4 m, const mat4 n) { - m[0] += n[0]; - m[1] += n[1]; - m[2] += n[2]; - m[3] += n[3]; + m[0] = m[0] + n[0]; + m[1] = m[1] + n[1]; + m[2] = m[2] + n[2]; + m[3] = m[3] + n[3]; + return m; } -void __operator -= (inout mat4 m, const mat4 n) { - m[0] -= n[0]; - m[1] -= n[1]; - m[2] -= n[2]; - m[3] -= n[3]; +mat4 __operator -= (inout mat4 m, const mat4 n) +{ + m[0] = m[0] - n[0]; + m[1] = m[1] - n[1]; + m[2] = m[2] - n[2]; + m[3] = m[3] - n[3]; + return m; } -void __operator *= (inout mat4 m, const mat4 n) +mat4 __operator *= (inout mat4 m, const mat4 n) { - m = m * n; + m = m * n; + return m; } -void __operator /= (inout mat4 m, const mat4 n) +mat4 __operator /= (inout mat4 m, const mat4 n) { - m[0] /= n[0]; - m[1] /= n[1]; - m[2] /= n[2]; - m[3] /= n[3]; + m[0] = m[0] / n[0]; + m[1] = m[1] / n[1]; + m[2] = m[2] / n[2]; + m[3] = m[3] / n[3]; + return m; } //// mat2/float assignment operators -void __operator += (inout mat2 m, const float a) { - m[0] += a; - m[1] += a; +mat2 __operator += (inout mat2 m, const float a) +{ + vec2 v = vec2(a); + m[0] = m[0] + v; + m[1] = m[1] + v; + return m; } -void __operator -= (inout mat2 m, const float a) { - m[0] -= a; - m[1] -= a; +mat2 __operator -= (inout mat2 m, const float a) +{ + vec2 v = vec2(a); + m[0] = m[0] - v; + m[1] = m[1] - v; + return m; } -void __operator *= (inout mat2 m, const float a) { - m[0] *= a; - m[1] *= a; +mat2 __operator *= (inout mat2 m, const float a) +{ + vec2 v = vec2(a); + m[0] = m[0] * v; + m[1] = m[1] * v; + return m; } -void __operator /= (inout mat2 m, const float a) { - m[0] /= a; - m[1] /= a; +mat2 __operator /= (inout mat2 m, const float a) +{ + vec2 v = vec2(1.0 / a); + m[0] = m[0] * v; + m[1] = m[1] * v; + return m; } //// mat3/float assignment operators -void __operator += (inout mat3 m, const float a) { - m[0] += a; - m[1] += a; - m[2] += a; +mat3 __operator += (inout mat3 m, const float a) +{ + vec3 v = vec3(a); + m[0] = m[0] + v; + m[1] = m[1] + v; + m[2] = m[2] + v; + return m; } -void __operator -= (inout mat3 m, const float a) { - m[0] -= a; - m[1] -= a; - m[2] -= a; +mat3 __operator -= (inout mat3 m, const float a) +{ + vec3 v = vec3(a); + m[0] = m[0] - v; + m[1] = m[1] - v; + m[2] = m[2] - v; + return m; } -void __operator *= (inout mat3 m, const float a) { - m[0] *= a; - m[1] *= a; - m[2] *= a; +mat3 __operator *= (inout mat3 m, const float a) +{ + vec3 v = vec3(a); + m[0] = m[0] * v; + m[1] = m[1] * v; + m[2] = m[2] * v; + return m; } -void __operator /= (inout mat3 m, const float a) { - m[0] /= a; - m[1] /= a; - m[2] /= a; +mat3 __operator /= (inout mat3 m, const float a) +{ + vec3 v = vec3(1.0 / a); + m[0] = m[0] * v; + m[1] = m[1] * v; + m[2] = m[2] * v; + return m; } //// mat4/float assignment operators -void __operator += (inout mat4 m, const float a) { - m[0] += a; - m[1] += a; - m[2] += a; - m[3] += a; +mat4 __operator += (inout mat4 m, const float a) +{ + vec4 v = vec4(a); + m[0] = m[0] + v; + m[1] = m[1] + v; + m[2] = m[2] + v; + m[3] = m[3] + v; + return m; } -void __operator -= (inout mat4 m, const float a) { - m[0] -= a; - m[1] -= a; - m[2] -= a; - m[3] -= a; +mat4 __operator -= (inout mat4 m, const float a) +{ + vec4 v = vec4(a); + m[0] = m[0] - v; + m[1] = m[1] - v; + m[2] = m[2] - v; + m[3] = m[3] - v; + return m; } -void __operator *= (inout mat4 m, const float a) { - m[0] *= a; - m[1] *= a; - m[2] *= a; - m[3] *= a; +mat4 __operator *= (inout mat4 m, const float a) +{ + vec4 v = vec4(a); + m[0] = m[0] * v; + m[1] = m[1] * v; + m[2] = m[2] * v; + m[3] = m[3] * v; + return m; } -void __operator /= (inout mat4 m, const float a) { - m[0] /= a; - m[1] /= a; - m[2] /= a; - m[3] /= a; +mat4 __operator /= (inout mat4 m, const float a) +{ + vec4 v = vec4(1.0 / a); + m[0] = m[0] * v; + m[1] = m[1] * v; + m[2] = m[2] * v; + m[3] = m[3] * v; + return m; } //// vec/mat assignment operators -void __operator *= (inout vec2 v, const mat2 m) +vec2 __operator *= (inout vec2 v, const mat2 m) { - v = v * m; + v = v * m; + return v; } -void __operator *= (inout vec3 v, const mat3 m) +vec3 __operator *= (inout vec3 v, const mat3 m) { - v = v * m; + v = v * m; + return v; } -void __operator *= (inout vec4 v, const mat4 m) +vec4 __operator *= (inout vec4 v, const mat4 m) { - v = v * m; + v = v * m; + return v; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index e344bd828ae..76344c68243 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -384,500 +384,486 @@ 0,48,46,20,0,0,1,90,95,0,0,9,0,0,100,111,116,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,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,90,95,0,0, 9,0,0,100,111,116,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,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,90,95,0,0,0,0,2,1,1,0,2,0,5,0,97,0,0, -1,1,0,0,5,0,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,90,95,0, -0,0,0,2,2,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,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,90,95,0,0,0,0,2,3,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,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,90,95, -0,0,0,0,2,4,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,3,2,90,95,0,0,9,0,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,4,118,101,99,52,95,116,111, -95,105,118,101,99,52,0,18,97,0,0,18,97,0,0,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0, -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,90,95,0,0,0,0,2, -2,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,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,90,95,0,0,0,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,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,90,95, -0,0,0,0,2,4,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,3,2,90,95,0,0,6,0,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,118,101,99,52, -95,116,111,95,105,118,101,99,52,0,18,118,0,0,18,122,0,0,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,7,0,118,0, -0,1,1,0,0,7,0,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, -90,95,0,0,0,0,2,2,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,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,90,95,0,0,0,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0, -0,7,0,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,90,95,0,0,0,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,3,2,90,95,0,0,7,0,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,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,118,0,0,18,122,0,0,0,0,1,90,95,0,0, -0,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,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,90,95,0,0,0,0,2,2,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,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,90,95,0,0,0,0,2,3,1, -0,2,0,8,0,118,0,0,1,1,0,0,8,0,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,90,95,0,0,0,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1, -3,2,90,95,0,0,8,0,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,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,118,0,0,18,122,0, -0,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,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,59,120,0,0,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,9,0,97, -0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,3,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2, -4,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,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,90,95,0,0,0,0,2,1,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0, -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,90,95,0,0,0,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,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,90,95,0,0,0,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,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,90,95,0,0,0,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,3,2,90,95,0,0, -10,0,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,90,95,0,0,0,0,2,1,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,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,90,95,0,0,0,0,2,2,1,0,2,0,11, -0,118,0,0,1,1,0,0,11,0,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,90,95,0,0,0,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0, -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,90,95,0,0,0,0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,3,2,90,95, -0,0,11,0,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,90,95,0,0,0,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,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,90,95,0,0,0,0,2,2,1,0,2,0,12,0,118,0,0,1,1,0,0,12, -0,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,90,95,0,0,0,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,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,90,95,0,0,0,0,2,4,1,0,2,0,12,0,118,0, -0,1,1,0,0,12,0,117,0,0,0,1,3,2,90,95,0,0,12,0,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,90,95,0,0,0,0,2,1,1,0,2,0, -6,0,118,0,0,1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,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,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,90,95,0,0,0,0,2,4,1,0,2,0,6,0,118,0,0, -1,1,0,0,5,0,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,90,95, -0,0,0,0,2,1,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,7,0,118,0,0, -1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,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,90,95,0,0,0,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0, -0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,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,0,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,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,90,95,0,0,0,0,2,1,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,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,0,0,0,1,90,95,0, -0,0,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,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,0,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,10,0,118,0,0,1, -1,0,0,9,0,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,0,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95, -0,0,9,0,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,105,110,118,65,0,0,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,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,0,0,0,1,90,95,0,0,0, -0,2,2,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,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,0,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,11,0,118,0,0,1, -1,0,0,9,0,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,0,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2, -90,95,0,0,9,0,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,105,110,118,65,0,0,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0, -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,0,0,0,1,90,95,0,0,0,0,2,2, -1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,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,0,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,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,0,0,0,1,90,95,0,0, -0,0,2,4,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,9,0,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,105,110,118,65,0,0,0,0,1,90,95,0,0,13,0,2,26,1,1,0, -0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,5,0,2,1,1,0,2,0,5,0,97,0,0, +1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0,2,2,1,0,2,0, +5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0, +2,3,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90, +95,0,0,5,0,2,4,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97, +0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, +46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0, +18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0, +0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6,0,118,0,0, +1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1, +0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90, +95,0,0,7,0,2,2,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8, +18,118,0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0, +18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9, +18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0, +8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8, +0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, +8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118, +0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, +49,20,0,8,18,118,0,0,0,1,90,95,0,0,9,0,2,1,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18, +97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,2,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9, +18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,3,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0, +98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,4,1,0,2,0,9,0,97,0,0, +1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97,0,0,0,1,90,95,0,0,10,0,2,1,1,0,2, +0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,46,18,117,0,46,0,8,18,118,0,0,0,1,90, +95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0, +8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18, +118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0, +0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0, +0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2, +2,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0, +0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, +48,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118, +0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0, +117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2,0,12,0, +118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, +12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18, +118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0, +18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2, +1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0, +0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0, +18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6, +0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,49,20,0, +8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0, +58,105,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,2,1,0,2,0,7,0,118,0, +0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,47,20,0,8,18,118, +0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105, +118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0, +0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1, +90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99, +52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0, +0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, +8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18, +97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,1, +1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0, +46,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0, +18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0, +118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18, +118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58, +118,101,99,50,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0,0,1,1, +0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1, +90,95,0,0,11,0,2,2,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +51,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97, +0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,11, +0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0, +0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18, +118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2, +0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,47,20,0, +8,18,118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118, +0,58,118,101,99,52,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0, +0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0, +0,1,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,13,0,2, +27,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109, +0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,0,48, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0, +57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,0,48,46,20,0,0,1,90,95, +0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,14,0,2,26,1,1,0, +0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,1,1,0, -0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,59,120, -120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,0,48,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,0,48,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,0,48,46,20,0,0,1,90,95,0,0,13,0,2,22,1,1,0,0,13, -0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,14,0,2,26,1,1,0,0,14,0,109,0,0,1,1,0,0,14, -0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1, -9,18,95,95,114,101,116,86,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,90,95,0,0,14,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,59,120,120,120,0,48, -18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110, -0,16,8,48,0,57,59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,59,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,49,0,57,59,122,122,122,0,48,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,50,0,57, -59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121,121,121,0,48,46,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,0,48,46,20,0,0,1,90,95,0,0,14,0,2,22,1,1,0,0, -14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,15,0,2,26,1,1,0,0,15,0,109,0,0,1, -1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,1,1,0,0,15, -0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,121,121,0,48,46,18, -109,0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110, -0,16,8,48,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,49,0,57,59,122,122, -122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,49,0,57,59,119,119,119,119,0,48,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,50,0,57,59,120, -120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121,121,121,121,0,48,46,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16, -10,50,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109, -0,16,8,48,0,57,18,110,0,16,10,51,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16, -10,51,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,51,0,57,59,122,122,122, -122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,59,119,119,119,119,0,48,46,20,0,0,1,90, -95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +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,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1, +1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,14,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,121,0,48,46,18,109, +0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,0,48,18,109,0,16,10,49, +0,57,18,110,0,16,10,49,0,57,59,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,49,0,57, +59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57, +18,110,0,16,10,50,0,57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121, +121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,0,48,46,20,0,0,1,90, +95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,13,0, -2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9, -18,95,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,90,95,0,0,13,0,2,27,1, -1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,21,1,1,0,0,9, -0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,22,1,1,0,0,9,0,97, -0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0, -0,14,0,110,0,0,0,1,9,18,95,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,90,95,0, -0,14,0,2,26,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95, -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,90,95,0,0,14,0,2,27,1,1,0,0,14,0, -109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1, -9,18,95,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,90,95,0,0,14,0,2,22,1,1,0, -0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110, -0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,26,1,1,0,0,15,0, -109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0, -0,15,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110, -0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,21,1,1,0,0,15,0, +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,90,95,0,0,15,0,2,26, +1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,15,0,2,27,1,1,0,0, +15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,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,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109, +0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121, +121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,122,0,48,46,18,109, +0,16,10,51,0,57,18,110,0,16,8,48,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,120,0,48,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16, +10,49,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,49,0,57,59,119,119,119, +119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,10,50,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121,121,121, +121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,122,0,48,46,18,109,0,16, +10,51,0,57,18,110,0,16,10,50,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,51,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,51,0,57,59,120,120,120,120,0,48,18,109,0,16, +10,49,0,57,18,110,0,16,10,51,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10, +51,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,59,119,119,119, +119,0,48,46,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95, +114,101,116,86,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,90,95,0,0,13,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0, +1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,1,1,0, +0,9,0,98,0,0,0,1,9,18,95,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, +90,95,0,0,13,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0, +98,0,0,0,1,9,18,95,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,90,95,0, +0,13,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,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,90,95,0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0, +1,9,18,95,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,90,95,0,0,14,0,2, +26,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,26,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,27,1,1,0,0,9,0,97,0,0,1, +1,0,0,14,0,110,0,0,0,1,9,18,95,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,90,95, +0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9, +18,95,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,90,95,0,0,14,0,2,21,1,1,0,0,14,0, 109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0, -0,15,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,10,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,10,0, -118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,48,0,57,18,118,0,59,120,120,0,48,18, -109,0,16,10,49,0,57,18,118,0,59,121,121,0,48,46,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,10,0,118,0,0, -1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,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,90,95,0,0,14,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,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,90,95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1, +9,18,95,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,90,95,0,0,15,0,2,26,1,1,0, +0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,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, +90,95,0,0,15,0,2,26,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95, +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,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,1,1, +0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2, +21,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,15,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9, +18,95,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,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0, +1,1,0,0,9,0,98,0,0,0,1,9,18,95,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,90,95,0,0,10,0,2, +21,1,1,0,0,13,0,109,0,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8, +48,0,57,18,118,0,59,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,0,48,46,20,0,0,1,90,95, +0,0,10,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, +120,0,58,100,111,116,0,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,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,11,0,2, +21,1,1,0,0,14,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8, +48,0,57,18,118,0,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,0,48,46,18,109, +0,16,10,50,0,57,18,118,0,59,122,122,122,0,48,46,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0, +1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,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,0,18, -118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,11,0, -118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,48,0,57,18,118,0,59,120,120,120,0,48, -18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,118,0,59,122,122, -122,0,48,46,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,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,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,0,18,118,0,0,18,109,0,16,10,50,0,57, -0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,16,8,48,0,57,18,118,0,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18, -118,0,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,118,0,59,122,122,122,122,0,48,46,18,109, -0,16,10,51,0,57,18,118,0,59,119,119,119,119,0,48,46,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118, -0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,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,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,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,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,13,0,109, -0,0,1,1,0,0,13,0,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,90,95,0,0,0,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,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,90,95,0,0,0,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109, -0,18,110,0,48,20,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,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, -90,95,0,0,0,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,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,90,95,0,0,0,0,2,2,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,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,90,95,0,0,0,0,2,3,1,0,2,0,14,0,109,0,0,1, -1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,14,0,109, -0,0,1,1,0,0,14,0,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,90,95, -0,0,0,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,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,90,95,0,0,0,0,2,2,1,0, -2,0,15,0,109,0,0,1,1,0,0,15,0,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,90,95,0,0,0,0,2,3,1,0,2,0,15,0,109,0,0, -1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,15,0, -109,0,0,1,1,0,0,15,0,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,90,95,0,0,0,0,2,1,1,0,2,0,13,0,109,0,0,1,1,0,0, -9,0,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,90, -95,0,0,0,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2, -4,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,2,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,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,90,95,0, -0,0,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,4,1,0,2, -0,14,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,1,1,0,2,0,15,0,109,0,0,1, -1,0,0,9,0,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,90,95,0,0,0,0,2,2,1, -0,2,0,15,0,109,0,0,1,1,0,0,9,0,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, -90,95,0,0,0,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,4,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,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,90,95,0,0,0,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,13,0,109,0, -0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,14,0, -109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0, -0,15,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,90,95,0,0,5,0,2,25,1,0,2,0,5,0,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,90,95, -0,0,6,0,2,25,1,0,2,0,6,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,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,90,95,0,0,7,0,2,25,1,0,2,0,7,0,118,0, -0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,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,90,95,0,0,8,0,2,25,1,0,2,0,8,0,118,0,0,0,1,9,18,118,0,18,118,0,58, -105,118,101,99,52,0,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, -90,95,0,0,9,0,2,25,1,0,2,0,9,0,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,90,95,0,0,10,0,2,25,1,0,2,0,10,0,118,0,0,0,1,9,18,118,0,18, -118,0,58,118,101,99,50,0,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,90,95,0,0,11,0,2,25,1,0,2,0,11,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,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,90,95,0,0,12,0,2,25,1, -0,2,0,12,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,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,90,95,0,0,13,0,2,25,1,0,2,0,13,0,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,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,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,90,95,0,0,14,0,2,25,1,0,2,0,14,0,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,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,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,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,90,95,0,0,15,0,2,25,1,0,2,0,15,0,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,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,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,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,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,90,95,0,0,5,0,2,24,1,0,2,0,5,0,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,90,95,0,0,6,0,2,24,1,0,2,0,6,0,118,0,0,0, -1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,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,90,95,0,0,7,0,2,24,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, -101,99,51,0,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,90,95,0, -0,8,0,2,24,1,0,2,0,8,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,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,90,95,0,0,9,0,2,24,1,0,2,0,9,0,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,90, -95,0,0,10,0,2,24,1,0,2,0,10,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,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,90,95,0,0,11,0,2,24,1,0,2,0,11,0, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,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,90,95,0,0,12,0,2,24,1,0,2,0,12,0,118,0,0,0,1,9,18,118,0,18,118,0, -58,118,101,99,52,0,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,90,95,0,0,13,0,2,24,1,0,2,0,13,0,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,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,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, -90,95,0,0,14,0,2,24,1,0,2,0,14,0,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,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,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,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,90, -95,0,0,15,0,2,24,1,0,2,0,15,0,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,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,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,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, -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,90,95,0,0,5,0,0, -95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,5,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,47,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,0,6,0,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,0,16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115,116,68,101, -99,114,0,1,0,2,0,7,0,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,0,16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,0,8,0,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,0,16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,9,0,0,95,95,112,111,115,116, -68,101,99,114,0,1,0,2,0,9,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,17,49,0,48,0,0,47,20,0,0,1,90,95,0,0,10,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0, -10,0,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,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,11,0,0,95,95,112,111,115,116,68,101,99,114,0,1, -0,2,0,11,0,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,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,12,0,0,95,95,112,111,115,116,68,101,99,114, -0,1,0,2,0,12,0,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,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,13,0,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,0,13,0,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,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,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,14,0,0,95, -95,112,111,115,116,68,101,99,114,0,1,0,2,0,14,0,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,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,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,0,17,49,0,48,0,0,0,0,47,20, -0,0,1,90,95,0,0,15,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,15,0,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,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,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, -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,0, -17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,9,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,9,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,90,95,0,0,10,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,10,0,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,0,17,49,0,48,0,0,0,0,46, -20,0,0,1,90,95,0,0,11,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,11,0,118,0,0,0,1,9,18,95, +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,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0, +0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,48,0,57,18,118,0,59,120,120, +120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18, +118,0,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,118,0,59,119,119,119,119,0,48,46,20,0,0, +1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,100,111,116,0,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,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,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,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0, +0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,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,109,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,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,13, +0,110,0,0,0,1,9,18,109,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,109, +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,8,18,109,0,0,0,1,90,95,0,0, +13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18, +109,0,0,0,1,90,95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,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,109,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,8,18,109,0,0,0,1,90,95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0, +0,14,0,110,0,0,0,1,9,18,109,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,109,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,109,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,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2, +0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,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,109,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,109,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,8,18,109,0,0,0,1,90, +95,0,0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, +8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,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,109,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,109,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,8,18,109,0,0,0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, +0,0,1,9,18,109,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,109,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,109,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,109,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,8,18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, +0,0,1,9,18,109,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,109,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,109,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,109,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,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, +0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0, +0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,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,109,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,109,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,109,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,8,18,109,0,0,0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109, +0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18, +109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0, +0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20, +0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10, +0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90, +95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118, +101,99,50,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90, +95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118, +101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18, +109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0, +97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0, +47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,8,18,109,0,0,0,1,90,95,0, +0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99, +51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0, +16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0, +1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,8,18,109,0,0, +0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,118,0,2,58, +118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9, +18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,118,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,46,20,0,8, +18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1, +118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118, +0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20,0,9,18,109,0,16,10,50,0, +57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118, +0,47,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90, +95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51, +0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0, +0,1,3,2,90,95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10, +0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0, +11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,14,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18, +118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,118,0,18,118,0, +18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,5,0,2,25,1,0,2,0,5,0,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,90,95,0,0,6,0,2,25,1,0,2,0,6,0, +118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,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,90,95,0,0,7,0,2,25,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0, +58,105,118,101,99,51,0,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,90,95,0,0,8,0,2,25,1,0,2,0,8,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,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,90,95,0,0,9,0,2,25,1,0,2,0,9,0, +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,90,95,0,0,10,0,2,25,1,0,2,0,10,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,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,90,95,0,0,11,0,2,25,1,0, +2,0,11,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,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,90,95,0,0,12,0,2,25,1,0,2,0,12,0,118,0,0,0,1,9,18,118, +0,18,118,0,58,118,101,99,52,0,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,90,95,0,0,13,0,2,25,1,0,2,0,13,0,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,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,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,90,95,0,0,14,0,2,25,1,0,2,0,14,0,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,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,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,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, +90,95,0,0,15,0,2,25,1,0,2,0,15,0,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,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,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,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,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,90, +95,0,0,5,0,2,24,1,0,2,0,5,0,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,90,95,0,0,6,0,2,24,1,0,2,0,6,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105, +118,101,99,50,0,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,90, +95,0,0,7,0,2,24,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,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,90,95,0,0,8,0,2,24,1,0,2,0,8,0,118, +0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,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,90,95,0,0,9,0,2,24,1,0,2,0,9,0,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,90,95,0,0,10,0,2,24,1,0,2,0,10, +0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,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,90,95,0,0,11,0,2,24,1,0,2,0,11,0,118,0,0,0,1,9,18,118,0,18, +118,0,58,118,101,99,51,0,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,90,95,0,0,12,0,2,24,1,0,2,0,12,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,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,90,95,0,0,13,0,2,24,1, +0,2,0,13,0,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,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,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,90,95,0,0,14,0,2,24,1,0,2,0, +14,0,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,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,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,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,90,95,0,0,15,0,2,24,1,0,2,0,15,0,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,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,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,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,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,90,95,0,0,5,0,0,95,95,112,111,115,116,68,101,99, +114,0,1,0,2,0,5,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,47,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,6,0,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,0,16, +10,49,0,0,0,47,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,7,0,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,0, +16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,8,0,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, +0,16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,9,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,9,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,17,49,0,48,0,0,47,20,0,0, +1,90,95,0,0,10,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,10,0,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,0,17,49,0,48,0,0,0,0,47, +20,0,0,1,90,95,0,0,11,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,11,0,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,0,17,49,0,48,0,0,0, -0,46,20,0,0,1,90,95,0,0,12,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,12,0,118,0,0,0,1,9,18, +0,47,20,0,0,1,90,95,0,0,12,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,12,0,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,0,17,49,0,48,0, -0,0,0,46,20,0,0,1,90,95,0,0,5,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,5,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,90,95,0,0,6, -0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,6,0,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,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0, -7,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,7,0,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,0,16,10,49,0,0,0,46,20,0,0,1,90,95, -0,0,8,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,8,0,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,0,16,10,49,0,0,0,46,20,0,0,1,90, -95,0,0,13,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,13,0,109,0,0,0,1,3,2,90,95,0,0,13,0,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,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,0,17,49,0,48,0, -0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,14,0, -109,0,0,0,1,3,2,90,95,0,0,14,0,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,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,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,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,15,0,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,0,15,0,109,0,0,0,1,3,2,90,95,0,0,15,0,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,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,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,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,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95, -0,0,1,0,2,15,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,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,90,95,0,0,1,0,2,15,1,1,0,0,5,0,97,0,0, -1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0, -0,40,0,0,1,90,95,0,0,1,0,2,16,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,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,90,95, -0,0,1,0,2,16,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58, -102,108,111,97,116,0,0,18,98,0,0,0,41,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0, -0,0,1,3,2,90,95,0,0,1,0,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,90,95,0,0,1,0,2,18,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58, -102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,43,0,0,1,90,95,0,0,1,0,2, -17,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,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,90,95,0,0,1,0,2,17,1,1, +0,0,0,47,20,0,0,1,90,95,0,0,13,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,13,0,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,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,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,68,101,99, +114,0,1,0,2,0,14,0,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,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,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,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,15,0,0,95,95, +112,111,115,116,68,101,99,114,0,1,0,2,0,15,0,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,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,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,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,0,17,49,0,48,0,0,0,0,47,20,0,0,1, +90,95,0,0,9,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,9,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,90,95,0,0,10,0,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,0,10,0,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,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,11,0,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,0,11,0,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,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,12,0, +0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,12,0,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,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0, +5,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,5,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,90,95,0,0,6,0,0,95,95,112,111,115,116, +73,110,99,114,0,1,0,2,0,6,0,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,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115, +116,73,110,99,114,0,1,0,2,0,7,0,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,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111, +115,116,73,110,99,114,0,1,0,2,0,8,0,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,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,13,0,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,0,13,0,109,0,0,0,1,3,2,90,95,0,0,13,0,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,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,0,17,49,0,48,0,0,0,0,46,20,0,8,18, +110,0,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,14,0,109,0,0,0,1,3,2,90, +95,0,0,14,0,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,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, +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,0, +17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,15,0,0,95,95,112,111,115,116,73,110,99,114,0, +1,0,2,0,15,0,109,0,0,0,1,3,2,90,95,0,0,15,0,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,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,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,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,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,1,0,2,15,1,1,0, +0,9,0,97,0,0,1,1,0,0,9,0,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,90,95,0,0,1,0,2,15,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0, +0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,40,0,0,1,90,95, +0,0,1,0,2,16,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,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,90,95,0,0,1,0,2,16,1,1, 0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97, -116,0,0,18,98,0,0,0,42,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,9,0,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,90,95,0,0,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,0,5,0,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1, -90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,1,0,98,0,0,0,1,4,98,111,111,108,95,112, -114,105,110,116,0,18,98,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,10,0, -118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,0,11,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,12,0,118,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +116,0,0,18,98,0,0,0,41,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90, +95,0,0,1,0,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,90,95,0,0,1,0,2,18,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111, +97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,43,0,0,1,90,95,0,0,1,0,2,17,1,1,0,0,9, +0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,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,90,95,0,0,1,0,2,17,1,1,0,0,5,0,97,0,0,1, +1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0, +42,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,9,0,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,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,0,5,0,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,90,95,0,0,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,0,1,0,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0, +18,98,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,10,0,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,11,0,118,0, +0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, 69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0, -0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,0,6,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118, -0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,7,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65, -0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,0,8,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116, -77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,119,0, -0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,2,0,118,0,0,0,1,9,58,112,114, +0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,12,0,118,0,0,0,1,9,58,112,114, 105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18, -118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,3,0,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0, -1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,4,0,118,0,0,0,1,9,58,112,114,105,110, +118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,0,6,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,0,7,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120, +0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116, +77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,0,8,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18, +118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0, +0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,2,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69, +83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0, +0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,3,0,118,0,0,0,1,9,58,112,114,105,110, 116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,0,13,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,0,14,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0, -16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,50,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,0,15,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8, -48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,109,0,16,10,51,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,16,0, -101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,0,17,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,18,0,101,0,0,0,1,4,105,110,116,95, +121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,0,4,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, +18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,13,0,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116, +77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,0,14,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,0,18,109,0,16,10,50,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0, +15,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, +18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,51,0,57,0,0,0, +0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,16,0,101,0,0,0,1,4,105,110,116,95, 112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0, -19,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,0,20,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,21,0,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,0 +17,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,0,18,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, +0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,19,0,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, +0,20,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,0,21,0,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 11ade9a3d1725075ef618a025f5494402dbc0053 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 16:12:23 -0700 Subject: docs: import 7.2 relnotes, start on 7.3 relnotes --- docs/relnotes-7.2.html | 104 +++++++++++++++++++++++++++++++++++++++++++++++++ docs/relnotes-7.3.html | 74 +++++++++++++++++++++++++++++++++++ docs/relnotes.html | 2 + 3 files changed, 180 insertions(+) create mode 100644 docs/relnotes-7.2.html create mode 100644 docs/relnotes-7.3.html diff --git a/docs/relnotes-7.2.html b/docs/relnotes-7.2.html new file mode 100644 index 00000000000..0ad3b5b607a --- /dev/null +++ b/docs/relnotes-7.2.html @@ -0,0 +1,104 @@ + + +Mesa Release Notes + + + + + + + +

Mesa 7.2 Release Notes / 20 September 2008

+ +

+Mesa 7.2 is a stable release fixing bugs found in 7.1, which was a +new development release. +

+

+Mesa 7.2 implements the OpenGL 2.1 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 2.1. +

+

+Note that this version of Mesa does not use the GEM memory manager. +The master branch of git uses GEM. +The prototype DRI2 code that was in 7.1 has also been removed. +

+

+DRM version 2.3.1 should be used with Mesa 7.2 +

+ + +

MD5 checksums

+
+81a2a4b7cbfce7553f7ad8d924edbe2f  MesaLib-7.2.tar.gz
+04d379292e023df0b0266825cb0dbde5  MesaLib-7.2.tar.bz2
+8bc497a37977a55e987a4d1fabc3d882  MesaLib-7.2.zip
+10c762e39486df395838af1d7b57e69c  MesaDemos-7.2.tar.gz
+22e03dc4038cd63f32c21eb60994892b  MesaDemos-7.2.tar.bz2
+1197bc4eb3bf44e291c14d4eb2e19381  MesaDemos-7.2.zip
+42e3c6c6d156cd9dc545dbef72407354  MesaGLUT-7.2.tar.gz
+f67daf93e12c4a459703bbf3e4004e31  MesaGLUT-7.2.tar.bz2
+0390567eb2c2d12fbf82e8523fd77e2b  MesaGLUT-7.2.zip
+
+ + +

New features

+
    +
  • i965 driver: added support for G41 chipset (Intel) +
+ + +

Bug fixes

+
    +
  • Fixed display list bug involving primitives split across lists (bug 17564) +
  • Fixed some issues with glBindAttribLocation() +
  • Fixed crash in _tnl_InvalidateState() found with Amira (bug 15834) +
  • Assorted bug fixes for Ming build +
  • Fixed some vertex/pixel buffer object reference counting bugs +
  • Fixed depth/stencil bug in i915/945 driver +
  • Fixed some shader flow control bugs in i965 driver +
  • Fixed a few tdfx driver bugs which prevented driver from working +
  • Fixed multisample enable/disable bug +
+ +

Changes

+
    +
  • Updated SGI header files with new license terms. +
+ + + +

To Do (someday) items

+
    +
  • Remove the MEMCPY() and _mesa_memcpy() wrappers and just use memcpy(). +Probably do the same for malloc, calloc, etc. +The wrappers were useful in the past for memory debugging but now we +have valgrind. Not worried about SunOS 4 support anymore either... +
  • Switch to freeglut +
  • Fix linux-glide target/driver. +
  • Improved lambda and derivative calculation for frag progs. +
+ + +

Driver Status

+ +
+Driver			Status
+----------------------	----------------------
+DRI drivers		varies with the driver
+XMesa/GLX (on Xlib)	implements OpenGL 2.1
+OSMesa (off-screen)	implements OpenGL 2.1
+Windows/Win32		implements OpenGL 2.1
+Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
+SVGA			unsupported
+Wind River UGL		unsupported
+DJGPP			unsupported
+GGI			unsupported
+BeOS			unsupported
+Allegro			unsupported
+D3D			unsupported
+
+ + + diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html new file mode 100644 index 00000000000..2be762d91db --- /dev/null +++ b/docs/relnotes-7.3.html @@ -0,0 +1,74 @@ + + +Mesa Release Notes + + + + + + + +

Mesa 7.3 Release Notes / TBD January 2009

+ +

+Mesa 7.3 is a new development release. +Users especially concerned with stability should stick with latest +stable release: version 7.2. +

+

+Mesa 7.3 implements the OpenGL 2.1 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 2.1. +

+

+

+DRM version 2.4.2 or later should be used with Mesa 7.3 +

+ + +

MD5 checksums

+
+tbd
+
+ + +

New features

+
    +
  • Support for GLSL 1.20 +
  • Intel DRI drivers now use GEM and DRI2 +
+ + +

Bug fixes

+
    +
  • Assorted GLSL bug fixes +
  • Assorted i965 driver fixes +
+ +

Changes

+
    +
+ + + +

Driver Status

+ +
+Driver			Status
+----------------------	----------------------
+DRI drivers		varies with the driver
+XMesa/GLX (on Xlib)	implements OpenGL 2.1
+OSMesa (off-screen)	implements OpenGL 2.1
+Windows/Win32		implements OpenGL 2.1
+Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
+SVGA			unsupported
+Wind River UGL		unsupported
+DJGPP			unsupported
+GGI			unsupported
+BeOS			unsupported
+Allegro			unsupported
+D3D			unsupported
+
+ + + diff --git a/docs/relnotes.html b/docs/relnotes.html index e3059771638..020e48551ec 100644 --- a/docs/relnotes.html +++ b/docs/relnotes.html @@ -20,6 +20,8 @@ The release notes summarize what's new or changed in each Mesa release.

    +
  • 7.3 release notes +
  • 7.2 release notes
  • 7.1 release notes
  • 7.0.4 release notes
  • 7.0.3 release notes -- cgit v1.2.3 From 1ed9b1ec90a0d641c12a0e7f613e588cf612fb5d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 16:14:19 -0700 Subject: docs: more 7.3 doc updates --- docs/download.html | 4 ++-- docs/news.html | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/download.html b/docs/download.html index 2d587f35f9f..37b0b3da479 100644 --- a/docs/download.html +++ b/docs/download.html @@ -9,9 +9,9 @@

    Downloading

    -Current development release: 7.1 +Current development release: 7.3
    -Last stable release: 7.0.4 +Last stable release: 7.2

    diff --git a/docs/news.html b/docs/news.html index 6d0d83659b8..784aea364a5 100644 --- a/docs/news.html +++ b/docs/news.html @@ -11,6 +11,20 @@

    News

    +

    January TBD, 2009

    +

    +Mesa 7.3 is released. +This is a new development release. +

    + + +

    September 20, 2008

    +

    +Mesa 7.2 is released. +This is a stable, bug-fix release. +

    + +

    August 26, 2008

    Mesa 7.1 is released. -- cgit v1.2.3 From 2c0ce92e8af4aab75f9a69a7913a1bec705220f3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 16:15:31 -0700 Subject: docs: updated Cell docs, from gallium-0.2 branch --- docs/cell.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/docs/cell.html b/docs/cell.html index f9915d67e54..7fbbba7c7e0 100644 --- a/docs/cell.html +++ b/docs/cell.html @@ -6,7 +6,7 @@ -

    Mesa Cell Driver

    +

    Mesa/Gallium Cell Driver

    The Mesa @@ -23,18 +23,19 @@ Two phases are planned. First, to implement the framework for parallel rasterization using the Cell SPEs, including texture mapping. Second, to implement a full-featured OpenGL driver with support for GLSL, etc. +The second phase is now underway.

    Source Code

    -The Cell driver source code is on the gallium-0.1 branch of the -git repository. +The latest Cell driver source code is on the gallium-0.2 branch +of the Mesa git repository. After you've cloned the repository, check out the branch with:

    -   git-checkout -b gallium-0.1 origin/gallium-0.1
    +   git-checkout -b gallium-0.2 origin/gallium-0.2
     

    To build the driver you'll need the IBM Cell SDK (version 2.1 or 3.0). @@ -43,12 +44,13 @@ or the Cell Simulator (untested, though).

    -If using Cell SDK 3.0, first edit configs/linux-cell and add --DSPU_MAIN_PARAM_LONG_LONG to the SPU_CFLAGS. +If using Cell SDK 2.1, see the configs/linux-cell file for some +special changes.

    To compile the code, run make linux-cell. +To build in debug mode, run make linux-cell-debug.

    @@ -60,7 +62,7 @@ directory that contains libGL.so. Verify that the Cell driver is being used by running glxinfo and looking for:

    -  OpenGL renderer string: Gallium 0.1, Cell on Xlib
    +  OpenGL renderer string: Gallium 0.2, Cell on Xlib
     
    @@ -77,21 +79,61 @@ SPU local store as needed. Similarly, textures are tiled and brought into local store as needed.

    + +

    Status

    + +

    +As of October 2008, the driver runs quite a few OpenGL demos. +Features that work include: +

    +
      +
    • Point/line/triangle rendering, glDrawPixels +
    • 2D, NPOT and cube texture maps with nearest/linear/mipmap filtering +
    • Dynamic SPU code generation for fragment shaders, but not complete +
    • Dynamic SPU code generation for fragment ops (blend, Z-test, etc), but not complete +
    • Dynamic PPU/PPC code generation for vertex shaders, but not complete +

    -More recently, vertex transformation has been parallelized across the SPUs -as well. +Performance has recently improved with the addition of PPC code generation +for vertex shaders, but the code quality isn't too great yet. +

    +

    +Another bottleneck is SwapBuffers. It may be the limiting factor for +many simple GL tests.

    -

    Status

    + +

    Debug Options

    -As of February 2008 the driver supports smooth/flat shaded triangle rendering -with Z testing and simple texture mapping. -Simple demos like gears run successfully. -To test texture mapping, try progs/demos/texcyl (press right mouse button for -rendering options). +The CELL_DEBUG env var can be set to a comma-separated list of one or +more of the following debug options:

    +
      +
    • checker - use a different background clear color for each SPU. + This lets you see which SPU is rendering which screen tiles. +
    • sync - wait/synchronize after each DMA transfer +
    • asm - print generated SPU assembly code to stdout +
    • fragops - emit fragment ops debug messages +
    • fragopfallback - don't use codegen for fragment ops +
    • cmd - print SPU commands as their received +
    • cache - print texture cache statistics when program exits +
    +

    +Note that some of these options may only work for linux-cell-debug builds. +

    + +

    +If the GALLIUM_NOPPC env var is set, PPC code generation will not be used +and vertex shaders will be run with the TGSI interpreter. +

    +

    +If the GALLIUM_NOCELL env var is set, the softpipe driver will be used +intead of the Cell driver. +This is useful for comparison/validation. +

    +

    Contributing

    -- cgit v1.2.3 From 0713e9da73cebfc35550ab192f385b955eb8ebcd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 16:16:36 -0700 Subject: mesa: set version string to 7.3-rc1 --- src/mesa/main/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index 81034a35d1e..83aefe685ad 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -31,7 +31,7 @@ #define MESA_MAJOR 7 #define MESA_MINOR 3 #define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.3-devel" +#define MESA_VERSION_STRING "7.3-rc1" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From acd99f67cc04ae249e35a9d80de12c0af012e4fc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 17:07:28 -0700 Subject: glsl: fix typo in the vec2 += operator function --- src/mesa/shader/slang/library/slang_core.gc | 2 +- src/mesa/shader/slang/library/slang_core_gc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 748add4bc8f..0a0d15903bc 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1344,7 +1344,7 @@ float __operator /= (inout float a, const float b) vec2 __operator += (inout vec2 v, const vec2 u) { - v + v + u; + v = v + u; return v; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 76344c68243..b3d3e87cf42 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -408,7 +408,7 @@ 18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,3,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0, 98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,4,1,0,2,0,9,0,97,0,0, 1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97,0,0,0,1,90,95,0,0,10,0,2,1,1,0,2, -0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,46,18,117,0,46,0,8,18,118,0,0,0,1,90, +0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90, 95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0, 8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18, 118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0, -- cgit v1.2.3 From d0c2cbd2571dba66463a37222d058f4394ba0918 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 17:19:51 -0700 Subject: docs: dri2proto, libdrm tweaks --- docs/install.html | 2 +- docs/relnotes-7.3.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install.html b/docs/install.html index 2d72506f67d..d740477c13f 100644 --- a/docs/install.html +++ b/docs/install.html @@ -38,7 +38,7 @@ The following are required for DRI-based hardware acceleration with Mesa 7.3:

      -
    • driproto2 version 1.99.3 or later +
    • dri2proto version 1.99.3 or later
    • DRM version 2.4.3 or later
    • Xorg server version 1.4 or 1.5. diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html index 2be762d91db..5cb7dc20fda 100644 --- a/docs/relnotes-7.3.html +++ b/docs/relnotes-7.3.html @@ -22,7 +22,7 @@ Some drivers don't support all the features required in OpenGL 2.1.

      -DRM version 2.4.2 or later should be used with Mesa 7.3 +DRM version 2.4.3 or later should be used with Mesa 7.3

      -- cgit v1.2.3 From 08fdc741bc509c284532d0e2fec32980c3047aec Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 17:20:18 -0700 Subject: mesa: import glext.h version 44 --- include/GL/glext.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 4255fa8639e..c0941aa8044 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -46,9 +46,9 @@ extern "C" { /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated 2008/10/09 */ +/* glext.h last updated 2008/11/14 */ /* Current version at http://www.opengl.org/registry/ */ -#define GL_GLEXT_VERSION 43 +#define GL_GLEXT_VERSION 44 #ifndef GL_VERSION_1_2 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 @@ -3834,6 +3834,34 @@ extern "C" { /* reuse GL_BGRA */ #endif +#ifndef GL_EXT_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +#endif + /*************************************************************/ @@ -8387,6 +8415,42 @@ typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenu #define GL_EXT_vertex_array_bgra 1 #endif +#ifndef GL_EXT_texture_swizzle +#define GL_EXT_texture_swizzle 1 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_NV_explicit_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMultisamplefvNV (GLenum, GLuint, GLfloat *); +GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint, GLbitfield); +GLAPI void APIENTRY glTexRenderbufferNV (GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_NV_transform_feedback2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum, GLuint); +GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint); +GLAPI void APIENTRY glPauseTransformFeedbackNV (void); +GLAPI void APIENTRY glResumeTransformFeedbackNV (void); +GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +#endif + #ifdef __cplusplus } -- cgit v1.2.3 From f7b4c2cca9ea9013f527b25ae45605047c58d64c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 17:20:41 -0700 Subject: mesa: latest glxext.h header, no version change --- include/GL/glxext.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/GL/glxext.h b/include/GL/glxext.h index 71cf0469e38..536fb25a76e 100644 --- a/include/GL/glxext.h +++ b/include/GL/glxext.h @@ -127,6 +127,14 @@ extern "C" { #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 #endif +#ifndef GLX_ARB_create_context +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 +#endif + #ifndef GLX_SGIS_multisample #define GLX_SAMPLE_BUFFERS_SGIS 100000 #define GLX_SAMPLES_SGIS 100001 @@ -366,14 +374,6 @@ extern "C" { #ifndef GLX_NV_swap_group #endif -#ifndef GLX_ARB_create_context -#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 -#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 -#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define GLX_CONTEXT_FLAGS_ARB 0x2094 -#endif - /*************************************************************/ @@ -510,6 +510,14 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam #define GLX_ARB_fbconfig_float 1 #endif +#ifndef GLX_ARB_create_context +#define GLX_ARB_create_context 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#endif + #ifndef GLX_SGIS_multisample #define GLX_SGIS_multisample 1 #endif @@ -817,14 +825,6 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawab #define GLX_NV_swap_group 1 #endif -#ifndef GLX_ARB_create_context -#define GLX_ARB_create_context 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); -#endif - #ifdef __cplusplus } -- cgit v1.2.3 From 4497a5a57d0fdb5c5ec15750e477aeb49f5e453d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Jan 2009 17:21:20 -0700 Subject: mesa: 7.3-rc-1 Makefile changes --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c92b4867f7e..dbe444d2941 100644 --- a/Makefile +++ b/Makefile @@ -174,10 +174,10 @@ ultrix-gcc: # Rules for making release tarballs -DIRECTORY = Mesa-7.1-rc4 -LIB_NAME = MesaLib-7.1-rc4 -DEMO_NAME = MesaDemos-7.1-rc4 -GLUT_NAME = MesaGLUT-7.1-rc4 +DIRECTORY = Mesa-7.3-rc1 +LIB_NAME = MesaLib-7.3-rc1 +DEMO_NAME = MesaDemos-7.3-rc1 +GLUT_NAME = MesaGLUT-7.3-rc1 MAIN_FILES = \ $(DIRECTORY)/Makefile* \ -- cgit v1.2.3 From ca03e881a8d8fa3e36a601238559c20311373633 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 9 Jan 2009 09:59:49 -0700 Subject: glsl: make minimum struct size = 2, not 1 1-component structs such as "struct foo { float x; }" could get placed at any position within a register. This caused some trouble computing the field offset which assumed all struct objects were placed at R.x. It would be unusual to hit this case in normal shaders. --- src/mesa/shader/slang/slang_codegen.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index ba1c955a1ae..f5c5cbdd484 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -228,7 +228,14 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) break; case SLANG_SPEC_STRUCT: sz = _slang_field_offset(spec, 0); /* special use */ - if (sz > 4) { + if (sz == 1) { + /* 1-float structs are actually troublesome to deal with since they + * might get placed at R.x, R.y, R.z or R.z. Return size=2 to + * ensure the object is placed at R.x + */ + sz = 2; + } + else if (sz > 4) { sz = (sz + 3) & ~0x3; /* round up to multiple of four */ } break; -- cgit v1.2.3 From 9939a306f7dc109d301e7b2d6abf4f2ab019bde0 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 9 Jan 2009 13:56:44 -0800 Subject: swrast: Fix GL_ATI_separate_stencil GL_ATI_separate_stencil is enabled by default for software rasterizers, but the extension functions weren't hooked up to the dispatch table. --- src/mesa/drivers/dri/swrast/swrast.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 49f1b8b9ee7..15b57244dcd 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -66,6 +66,7 @@ #define need_GL_ARB_vertex_program #define need_GL_APPLE_vertex_array_object #define need_GL_ATI_fragment_shader +#define need_GL_ATI_separate_stencil #define need_GL_EXT_depth_bounds_test #define need_GL_EXT_framebuffer_object #define need_GL_EXT_framebuffer_blit @@ -96,6 +97,7 @@ const struct dri_extension card_extensions[] = { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, { "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions }, { "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions }, + { "GL_ATI_separate_stencil", GL_ATI_separate_stencil_functions }, { "GL_EXT_depth_bounds_test", GL_EXT_depth_bounds_test_functions }, { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions }, { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions }, -- cgit v1.2.3 From 1d352b42a106ed0c3cd0831fa681d07794b7ff3d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 11:39:05 -0700 Subject: glsl: replace 0/1 with GL_FALSE/GL_TRUE --- src/mesa/shader/slang/slang_compile.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index c150931ead8..ec27fc69dff 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1005,7 +1005,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, /* parse child statements, do not create new variable scope */ oper->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; while (*C->I != OP_END) - if (!parse_child_operation(C, O, oper, 1)) + if (!parse_child_operation(C, O, oper, GL_TRUE)) RETURN0; C->I++; break; @@ -1017,7 +1017,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, oper->type = SLANG_OPER_BLOCK_NEW_SCOPE; o.vars = oper->locals; while (*C->I != OP_END) - if (!parse_child_operation(C, &o, oper, 1)) + if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; C->I++; } @@ -1074,7 +1074,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, if (oper->a_id == SLANG_ATOM_NULL) RETURN0; while (*C->I != OP_END) { - if (!parse_child_operation(C, O, oper, 0)) + if (!parse_child_operation(C, O, oper, GL_FALSE)) RETURN0; } C->I++; @@ -1090,21 +1090,21 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, break; case OP_RETURN: oper->type = SLANG_OPER_RETURN; - if (!parse_child_operation(C, O, oper, 0)) + if (!parse_child_operation(C, O, oper, GL_FALSE)) RETURN0; break; case OP_EXPRESSION: oper->type = SLANG_OPER_EXPRESSION; - if (!parse_child_operation(C, O, oper, 0)) + if (!parse_child_operation(C, O, oper, GL_FALSE)) RETURN0; break; case OP_IF: oper->type = SLANG_OPER_IF; - if (!parse_child_operation(C, O, oper, 0)) + if (!parse_child_operation(C, O, oper, GL_FALSE)) RETURN0; - if (!parse_child_operation(C, O, oper, 1)) + if (!parse_child_operation(C, O, oper, GL_TRUE)) RETURN0; - if (!parse_child_operation(C, O, oper, 1)) + if (!parse_child_operation(C, O, oper, GL_TRUE)) RETURN0; break; case OP_WHILE: @@ -1113,17 +1113,17 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, oper->type = SLANG_OPER_WHILE; o.vars = oper->locals; - if (!parse_child_operation(C, &o, oper, 1)) + if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; - if (!parse_child_operation(C, &o, oper, 1)) + if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; } break; case OP_DO: oper->type = SLANG_OPER_DO; - if (!parse_child_operation(C, O, oper, 1)) + if (!parse_child_operation(C, O, oper, GL_TRUE)) RETURN0; - if (!parse_child_operation(C, O, oper, 0)) + if (!parse_child_operation(C, O, oper, GL_FALSE)) RETURN0; break; case OP_FOR: @@ -1132,13 +1132,13 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, oper->type = SLANG_OPER_FOR; o.vars = oper->locals; - if (!parse_child_operation(C, &o, oper, 1)) + if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; - if (!parse_child_operation(C, &o, oper, 1)) + if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; - if (!parse_child_operation(C, &o, oper, 0)) + if (!parse_child_operation(C, &o, oper, GL_FALSE)) RETURN0; - if (!parse_child_operation(C, &o, oper, 1)) + if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; } break; @@ -1429,7 +1429,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, C->I++; while (*C->I != OP_END) - if (!parse_child_operation(C, O, op, 0)) + if (!parse_child_operation(C, O, op, GL_FALSE)) RETURN0; C->I++; #if 0 @@ -1494,7 +1494,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, RETURN0; } while (*C->I != OP_END) - if (!parse_child_operation(C, O, op, 0)) + if (!parse_child_operation(C, O, op, GL_FALSE)) RETURN0; C->I++; -- cgit v1.2.3 From 6333005f7aea3e5d1d86a5c47b3fa2a1ed2f3ff0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 11:40:20 -0700 Subject: glsl: force creation of new scope for for-loop body Fixes regression in progs/demos/convolution.c due to loop unrolling. This also allows the following to be compiled correctly: for (int i = 0; i < n; i++) { int i; ... } This fix is a bit of a hack, however. The better fix would be to change the slang_shader.syn grammar. Will revisit that... --- src/mesa/shader/slang/slang_compile.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index ec27fc69dff..add8594ff95 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1138,8 +1138,26 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, RETURN0; if (!parse_child_operation(C, &o, oper, GL_FALSE)) RETURN0; +#if 0 if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; +#else + /* force creation of new scope for loop body */ + { + slang_operation *ch; + slang_output_ctx oo = o; + + /* grow child array */ + ch = slang_operation_grow(&oper->num_children, &oper->children); + ch->type = SLANG_OPER_BLOCK_NEW_SCOPE; + + ch->locals->outer_scope = o.vars; + oo.vars = ch->locals; + + if (!parse_child_operation(C, &oo, ch, GL_TRUE)) + RETURN0; + } +#endif } break; case OP_PRECISION: -- cgit v1.2.3 From 2c56dd775771d9d5ea2e22cf4ee4b5dbbbb2a03d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 11:52:55 -0700 Subject: docs: prerequisite updates --- docs/install.html | 5 +++-- docs/relnotes-7.3.html | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/install.html b/docs/install.html index d740477c13f..be61ef30433 100644 --- a/docs/install.html +++ b/docs/install.html @@ -39,9 +39,10 @@ The following are required for DRI-based hardware acceleration with Mesa 7.3:
      • dri2proto version 1.99.3 or later -
      • DRM +
      • Linux 2.6.28 +
      • libDRM version 2.4.3 or later -
      • Xorg server version 1.4 or 1.5. +
      • Xorg server version 1.5 or later

      diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html index 5cb7dc20fda..c00e5fe2f80 100644 --- a/docs/relnotes-7.3.html +++ b/docs/relnotes-7.3.html @@ -21,8 +21,8 @@ glGetString(GL_VERSION) depends on the particular driver being used. Some drivers don't support all the features required in OpenGL 2.1.

      -

      -DRM version 2.4.3 or later should be used with Mesa 7.3 +See the Compiling/Installing page for prerequisites +for DRI ardware acceleration.

      -- cgit v1.2.3 From 1636328b0adefcebcc204d63980184a6d592efae Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 11:57:13 -0700 Subject: xmesa: deprecate the "XMesa" interface Move the include/GL/xmesa*.h files to src/mesa/drivers/x11/ so they're no longer considered public. --- include/GL/xmesa.h | 424 -------------------------------------- include/GL/xmesa_x.h | 86 -------- include/GL/xmesa_xf86.h | 198 ------------------ src/mesa/drivers/x11/fakeglx.c | 1 - src/mesa/drivers/x11/xm_api.c | 1 - src/mesa/drivers/x11/xm_buffer.c | 1 - src/mesa/drivers/x11/xmesa.h | 424 ++++++++++++++++++++++++++++++++++++++ src/mesa/drivers/x11/xmesaP.h | 2 +- src/mesa/drivers/x11/xmesa_x.h | 86 ++++++++ src/mesa/drivers/x11/xmesa_xf86.h | 198 ++++++++++++++++++ 10 files changed, 709 insertions(+), 712 deletions(-) delete mode 100644 include/GL/xmesa.h delete mode 100644 include/GL/xmesa_x.h delete mode 100644 include/GL/xmesa_xf86.h create mode 100644 src/mesa/drivers/x11/xmesa.h create mode 100644 src/mesa/drivers/x11/xmesa_x.h create mode 100644 src/mesa/drivers/x11/xmesa_xf86.h diff --git a/include/GL/xmesa.h b/include/GL/xmesa.h deleted file mode 100644 index 98139af8336..00000000000 --- a/include/GL/xmesa.h +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * 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. - */ - - -/* - * Mesa/X11 interface. This header file serves as the documentation for - * the Mesa/X11 interface functions. - * - * Note: this interface isn't intended for user programs. It's primarily - * just for implementing the pseudo-GLX interface. - */ - - -/* Sample Usage: - -In addition to the usual X calls to select a visual, create a colormap -and create a window, you must do the following to use the X/Mesa interface: - -1. Call XMesaCreateVisual() to make an XMesaVisual from an XVisualInfo. - -2. Call XMesaCreateContext() to create an X/Mesa rendering context, given - the XMesaVisual. - -3. Call XMesaCreateWindowBuffer() to create an XMesaBuffer from an X window - and XMesaVisual. - -4. Call XMesaMakeCurrent() to bind the XMesaBuffer to an XMesaContext and - to make the context the current one. - -5. Make gl* calls to render your graphics. - -6. Use XMesaSwapBuffers() when double buffering to swap front/back buffers. - -7. Before the X window is destroyed, call XMesaDestroyBuffer(). - -8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext. - -*/ - - - - -#ifndef XMESA_H -#define XMESA_H - -#ifdef __VMS -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef XFree86Server -#include "xmesa_xf86.h" -#else -#include -#include -#include "xmesa_x.h" -#endif -#include "GL/gl.h" - -#ifdef AMIWIN -#include -extern struct Library *XLibBase; -#endif - - -#define XMESA_MAJOR_VERSION 6 -#define XMESA_MINOR_VERSION 3 - - - -/* - * Values passed to XMesaGetString: - */ -#define XMESA_VERSION 1 -#define XMESA_EXTENSIONS 2 - - -/* - * Values passed to XMesaSetFXmode: - */ -#define XMESA_FX_WINDOW 1 -#define XMESA_FX_FULLSCREEN 2 - - - -typedef struct xmesa_context *XMesaContext; - -typedef struct xmesa_visual *XMesaVisual; - -typedef struct xmesa_buffer *XMesaBuffer; - - - -/* - * Create a new X/Mesa visual. - * Input: display - X11 display - * visinfo - an XVisualInfo pointer - * rgb_flag - GL_TRUE = RGB mode, - * GL_FALSE = color index mode - * alpha_flag - alpha buffer requested? - * db_flag - GL_TRUE = double-buffered, - * GL_FALSE = single buffered - * stereo_flag - stereo visual? - * ximage_flag - GL_TRUE = use an XImage for back buffer, - * GL_FALSE = use an off-screen pixmap for back buffer - * depth_size - requested bits/depth values, or zero - * stencil_size - requested bits/stencil values, or zero - * accum_red_size - requested bits/red accum values, or zero - * accum_green_size - requested bits/green accum values, or zero - * accum_blue_size - requested bits/blue accum values, or zero - * accum_alpha_size - requested bits/alpha accum values, or zero - * num_samples - number of samples/pixel if multisampling, or zero - * level - visual level, usually 0 - * visualCaveat - ala the GLX extension, usually GLX_NONE_EXT - * Return; a new XMesaVisual or 0 if error. - */ -extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display, - XMesaVisualInfo visinfo, - GLboolean rgb_flag, - GLboolean alpha_flag, - GLboolean db_flag, - GLboolean stereo_flag, - GLboolean ximage_flag, - GLint depth_size, - GLint stencil_size, - GLint accum_red_size, - GLint accum_green_size, - GLint accum_blue_size, - GLint accum_alpha_size, - GLint num_samples, - GLint level, - GLint visualCaveat ); - -/* - * Destroy an XMesaVisual, but not the associated XVisualInfo. - */ -extern void XMesaDestroyVisual( XMesaVisual v ); - - - -/* - * Create a new XMesaContext for rendering into an X11 window. - * - * Input: visual - an XMesaVisual - * share_list - another XMesaContext with which to share display - * lists or NULL if no sharing is wanted. - * Return: an XMesaContext or NULL if error. - */ -extern XMesaContext XMesaCreateContext( XMesaVisual v, - XMesaContext share_list ); - - -/* - * Destroy a rendering context as returned by XMesaCreateContext() - */ -extern void XMesaDestroyContext( XMesaContext c ); - - -#ifdef XFree86Server -/* - * These are the extra routines required for integration with XFree86. - * None of these routines should be user visible. -KEM - */ -extern GLboolean XMesaForceCurrent( XMesaContext c ); - -extern GLboolean XMesaLoseCurrent( XMesaContext c ); - -extern GLboolean XMesaCopyContext( XMesaContext src, - XMesaContext dst, - GLuint mask ); -#endif /* XFree86Server */ - - -/* - * Create an XMesaBuffer from an X window. - */ -extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w ); - - -/* - * Create an XMesaBuffer from an X pixmap. - */ -extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v, - XMesaPixmap p, - XMesaColormap cmap ); - - -/* - * Destroy an XMesaBuffer, but not the corresponding window or pixmap. - */ -extern void XMesaDestroyBuffer( XMesaBuffer b ); - - -/* - * Return the XMesaBuffer handle which corresponds to an X drawable, if any. - * - * New in Mesa 2.3. - */ -extern XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy, - XMesaDrawable d ); - - - -/* - * Bind a buffer to a context and make the context the current one. - */ -extern GLboolean XMesaMakeCurrent( XMesaContext c, - XMesaBuffer b ); - - -/* - * Bind two buffers (read and draw) to a context and make the - * context the current one. - * New in Mesa 3.3 - */ -extern GLboolean XMesaMakeCurrent2( XMesaContext c, - XMesaBuffer drawBuffer, - XMesaBuffer readBuffer ); - - -/* - * Unbind the current context from its buffer. - */ -extern GLboolean XMesaUnbindContext( XMesaContext c ); - - -/* - * Return a handle to the current context. - */ -extern XMesaContext XMesaGetCurrentContext( void ); - - -/* - * Return handle to the current (draw) buffer. - */ -extern XMesaBuffer XMesaGetCurrentBuffer( void ); - - -/* - * Return handle to the current read buffer. - * New in Mesa 3.3 - */ -extern XMesaBuffer XMesaGetCurrentReadBuffer( void ); - - -/* - * Swap the front and back buffers for the given buffer. No action is - * taken if the buffer is not double buffered. - */ -extern void XMesaSwapBuffers( XMesaBuffer b ); - - -/* - * Copy a sub-region of the back buffer to the front buffer. - * - * New in Mesa 2.6 - */ -extern void XMesaCopySubBuffer( XMesaBuffer b, - int x, - int y, - int width, - int height ); - - -/* - * Return a pointer to the the Pixmap or XImage being used as the back - * color buffer of an XMesaBuffer. This function is a way to get "under - * the hood" of X/Mesa so one can manipulate the back buffer directly. - * Input: b - the XMesaBuffer - * Output: pixmap - pointer to back buffer's Pixmap, or 0 - * ximage - pointer to back buffer's XImage, or NULL - * Return: GL_TRUE = context is double buffered - * GL_FALSE = context is single buffered - */ -extern GLboolean XMesaGetBackBuffer( XMesaBuffer b, - XMesaPixmap *pixmap, - XMesaImage **ximage ); - - - -/* - * Return the depth buffer associated with an XMesaBuffer. - * Input: b - the XMesa buffer handle - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - * - * New in Mesa 2.4. - */ -extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b, - GLint *width, - GLint *height, - GLint *bytesPerValue, - void **buffer ); - - - -/* - * Flush/sync a context - */ -extern void XMesaFlush( XMesaContext c ); - - - -/* - * Get an X/Mesa-specific string. - * Input: name - either XMESA_VERSION or XMESA_EXTENSIONS - */ -extern const char *XMesaGetString( XMesaContext c, int name ); - - - -/* - * Scan for XMesaBuffers whose window/pixmap has been destroyed, then free - * any memory used by that buffer. - * - * New in Mesa 2.3. - */ -extern void XMesaGarbageCollect( void ); - - - -/* - * Return a dithered pixel value. - * Input: c - XMesaContext - * x, y - window coordinate - * red, green, blue, alpha - color components in [0,1] - * Return: pixel value - * - * New in Mesa 2.3. - */ -extern unsigned long XMesaDitherColor( XMesaContext xmesa, - GLint x, - GLint y, - GLfloat red, - GLfloat green, - GLfloat blue, - GLfloat alpha ); - - - -/* - * 3Dfx Glide driver only! - * Set 3Dfx/Glide full-screen or window rendering mode. - * Input: mode - either XMESA_FX_WINDOW (window rendering mode) or - * XMESA_FX_FULLSCREEN (full-screen rendering mode) - * Return: GL_TRUE if success - * GL_FALSE if invalid mode or if not using 3Dfx driver - * - * New in Mesa 2.6. - */ -extern GLboolean XMesaSetFXmode( GLint mode ); - - - -/* - * Reallocate the back/depth/stencil/accum/etc/ buffers associated with - * buffer if its size has changed. - * - * New in Mesa 4.0.2 - */ -extern void XMesaResizeBuffers( XMesaBuffer b ); - - - -/* - * Create a pbuffer. - * New in Mesa 4.1 - */ -extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap, - unsigned int width, unsigned int height); - - - -/* - * Texture from Pixmap - * New in Mesa 7.1 - */ -extern void -XMesaBindTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer, - const int *attrib_list); - -extern void -XMesaReleaseTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer); - - -extern XMesaBuffer -XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p, - XMesaColormap cmap, - int format, int target, int mipmap); - - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/include/GL/xmesa_x.h b/include/GL/xmesa_x.h deleted file mode 100644 index 865bab4313b..00000000000 --- a/include/GL/xmesa_x.h +++ /dev/null @@ -1,86 +0,0 @@ - -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -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, sub license, 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 (including the -next paragraph) 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 NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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: - * Kevin E. Martin - * - * When we're building the XMesa driver for stand-alone Mesa we - * include this file when building the xm_*.c files. - * We need to define some types and macros differently when building - * in the Xserver vs. stand-alone Mesa. - */ - -#ifndef _XMESA_X_H_ -#define _XMESA_X_H_ - -typedef Display XMesaDisplay; -typedef Pixmap XMesaPixmap; -typedef Colormap XMesaColormap; -typedef Drawable XMesaDrawable; -typedef Window XMesaWindow; -typedef GC XMesaGC; -typedef XVisualInfo *XMesaVisualInfo; -typedef XImage XMesaImage; -typedef XPoint XMesaPoint; -typedef XColor XMesaColor; - -#define XMesaDestroyImage XDestroyImage - -#define XMesaPutPixel XPutPixel -#define XMesaGetPixel XGetPixel - -#define XMesaSetForeground XSetForeground -#define XMesaSetBackground XSetBackground -#define XMesaSetPlaneMask XSetPlaneMask -#define XMesaSetFunction XSetFunction -#define XMesaSetFillStyle XSetFillStyle -#define XMesaSetTile XSetTile - -#define XMesaDrawPoint XDrawPoint -#define XMesaDrawPoints XDrawPoints -#define XMesaDrawLine XDrawLine -#define XMesaFillRectangle XFillRectangle -#define XMesaGetImage XGetImage -#define XMesaPutImage XPutImage -#define XMesaCopyArea XCopyArea - -#define XMesaCreatePixmap XCreatePixmap -#define XMesaFreePixmap XFreePixmap -#define XMesaFreeGC XFreeGC - -#define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size -#define GET_REDMASK(__v) __v->mesa_visual.redMask -#define GET_GREENMASK(__v) __v->mesa_visual.greenMask -#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask -#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth -#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen) -#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display) -#define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True) - -#endif diff --git a/include/GL/xmesa_xf86.h b/include/GL/xmesa_xf86.h deleted file mode 100644 index 10f93c3ab62..00000000000 --- a/include/GL/xmesa_xf86.h +++ /dev/null @@ -1,198 +0,0 @@ - -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -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, sub license, 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 (including the -next paragraph) 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 NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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: - * Kevin E. Martin - * - * When we're building the XMesa driver for use in the X server (as the - * indirect render) we include this file when building the xm_*.c files. - * We need to define some types and macros differently when building - * in the Xserver vs. stand-alone Mesa. - */ - -#ifndef _XMESA_XF86_H_ -#define _XMESA_XF86_H_ - -#include "GL/glxtokens.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "gcstruct.h" -#include "servermd.h" - - -typedef struct _XMesaImageRec { - int width, height; - char *data; - int bytes_per_line; /* Padded to 32 bits */ - int bits_per_pixel; -} XMesaImage; - -typedef ScreenRec XMesaDisplay; -typedef PixmapPtr XMesaPixmap; -typedef ColormapPtr XMesaColormap; -typedef DrawablePtr XMesaDrawable; -typedef WindowPtr XMesaWindow; -typedef GCPtr XMesaGC; -typedef VisualPtr XMesaVisualInfo; -typedef DDXPointRec XMesaPoint; -typedef xColorItem XMesaColor; - -#define XMesaSetGeneric(__d,__gc,__val,__mask) \ -do { \ - CARD32 __v[1]; \ - (void) __d; \ - __v[0] = __val; \ - dixChangeGC(NullClient, __gc, __mask, __v, NULL); \ -} while (0) - -#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \ -do { \ - ChangeGCVal __v[1]; \ - (void) __d; \ - __v[0].ptr = __pval; \ - dixChangeGC(NullClient, __gc, __mask, NULL, __v); \ -} while (0) - -#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground) -#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground) -#define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask) -#define XMesaSetFunction(d,gc,v) XMesaSetGeneric(d,gc,v,GCFunction) -#define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle) - -#define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile) - -#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \ -do { \ - XMesaPoint __p[1]; \ - (void) __d; \ - __p[0].x = __x; \ - __p[0].y = __y; \ - ValidateGC(__b, __gc); \ - (*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \ -} while (0) - -#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \ -do { \ - (void) __d; \ - ValidateGC(__b, __gc); \ - (*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \ -} while (0) - -#define XMesaDrawLine(__d, __b, __gc, __x0, __y0, __x1, __y1) \ -do { \ - XMesaPoint __p[2]; \ - (void) __d; \ - __p[0].x = __x0; \ - __p[0].y = __y0; \ - __p[1].x = __x1; \ - __p[1].y = __y1; \ - ValidateGC(__b, __gc); \ - (*gc->ops->PolyLines)(__b, __gc, CoordModeOrigin, 2, __p); \ -} while (0) - -#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \ -do { \ - xRectangle __r[1]; \ - (void) __d; \ - ValidateGC((DrawablePtr)__b, __gc); \ - __r[0].x = __x; \ - __r[0].y = __y; \ - __r[0].width = __w; \ - __r[0].height = __h; \ - (*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \ -} while (0) - -static _X_INLINE XMesaImage *XMesaGetImage(XMesaDisplay *dpy, PixmapPtr p, int x, - int y, unsigned int width, - unsigned int height, - unsigned long plane_mask, int format) -{ - XMesaImage *img = Xcalloc(sizeof(*img)); - - img->width = p->drawable.width; - img->height = p->drawable.height; - img->bits_per_pixel = p->drawable.bitsPerPixel; - img->bytes_per_line = PixmapBytePad(width, p->drawable.depth); - img->data = malloc(height * img->bytes_per_line); - - /* Assumes: Images are always in ZPixmap format */ - (*p->drawable.pScreen->GetImage)(&p->drawable, x, y, width, height, - plane_mask, ZPixmap, img->data); - - return img; -} - -#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \ -do { \ - /* Assumes: Images are always in ZPixmap format */ \ - (void) __d; \ - ASSERT(!__sx && !__sy); /* The SubImage case */ \ - ValidateGC(__b, __gc); \ - (*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \ - __x, __y, __w, __h, 0, ZPixmap, \ - ((XMesaImage *)(__i))->data); \ -} while (0) - -#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \ -do { \ - (void) __d; \ - ValidateGC(__db, __gc); \ - (*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \ - __sx, __sy, __w, __h, __x, __y); \ -} while (0) - - -/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ -#ifdef CREATE_PIXMAP_USAGE_SCRATCH -#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ - (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) -#else -#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ - (*__d->CreatePixmap)(__d, __w, __h, __depth) -#endif - -#define XMesaFreePixmap(__d,__b) \ - (*__d->DestroyPixmap)(__b) - -#define XMesaFreeGC(__d,__gc) \ -do { \ - (void) __d; \ - FreeScratchGC(__gc); \ -} while (0) - -#define GET_COLORMAP_SIZE(__v) __v->ColormapEntries -#define GET_REDMASK(__v) __v->mesa_visual.redMask -#define GET_GREENMASK(__v) __v->mesa_visual.greenMask -#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask -#define GET_VISUAL_DEPTH(__v) __v->nplanes -#define GET_BLACK_PIXEL(__v) __v->display->blackPixel -#define CHECK_BYTE_ORDER(__v) GL_TRUE -#define CHECK_FOR_HPCR(__v) GL_FALSE - -#endif diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 827d39f9957..ea3585258d8 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -42,7 +42,6 @@ #include "glxheader.h" #include "glxapi.h" -#include "GL/xmesa.h" #include "main/context.h" #include "main/config.h" #include "main/macros.h" diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index c9009bad031..18aa8bcc096 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -63,7 +63,6 @@ #endif #include "glxheader.h" -#include "GL/xmesa.h" #include "xmesaP.h" #include "main/context.h" #include "main/extensions.h" diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index f104d44d051..7ad67bc34da 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++ b/src/mesa/drivers/x11/xm_buffer.c @@ -30,7 +30,6 @@ #include "glxheader.h" -#include "GL/xmesa.h" #include "xmesaP.h" #include "main/imports.h" #include "main/framebuffer.h" diff --git a/src/mesa/drivers/x11/xmesa.h b/src/mesa/drivers/x11/xmesa.h new file mode 100644 index 00000000000..98139af8336 --- /dev/null +++ b/src/mesa/drivers/x11/xmesa.h @@ -0,0 +1,424 @@ +/* + * Mesa 3-D graphics library + * Version: 7.1 + * + * 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. + */ + + +/* + * Mesa/X11 interface. This header file serves as the documentation for + * the Mesa/X11 interface functions. + * + * Note: this interface isn't intended for user programs. It's primarily + * just for implementing the pseudo-GLX interface. + */ + + +/* Sample Usage: + +In addition to the usual X calls to select a visual, create a colormap +and create a window, you must do the following to use the X/Mesa interface: + +1. Call XMesaCreateVisual() to make an XMesaVisual from an XVisualInfo. + +2. Call XMesaCreateContext() to create an X/Mesa rendering context, given + the XMesaVisual. + +3. Call XMesaCreateWindowBuffer() to create an XMesaBuffer from an X window + and XMesaVisual. + +4. Call XMesaMakeCurrent() to bind the XMesaBuffer to an XMesaContext and + to make the context the current one. + +5. Make gl* calls to render your graphics. + +6. Use XMesaSwapBuffers() when double buffering to swap front/back buffers. + +7. Before the X window is destroyed, call XMesaDestroyBuffer(). + +8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext. + +*/ + + + + +#ifndef XMESA_H +#define XMESA_H + +#ifdef __VMS +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef XFree86Server +#include "xmesa_xf86.h" +#else +#include +#include +#include "xmesa_x.h" +#endif +#include "GL/gl.h" + +#ifdef AMIWIN +#include +extern struct Library *XLibBase; +#endif + + +#define XMESA_MAJOR_VERSION 6 +#define XMESA_MINOR_VERSION 3 + + + +/* + * Values passed to XMesaGetString: + */ +#define XMESA_VERSION 1 +#define XMESA_EXTENSIONS 2 + + +/* + * Values passed to XMesaSetFXmode: + */ +#define XMESA_FX_WINDOW 1 +#define XMESA_FX_FULLSCREEN 2 + + + +typedef struct xmesa_context *XMesaContext; + +typedef struct xmesa_visual *XMesaVisual; + +typedef struct xmesa_buffer *XMesaBuffer; + + + +/* + * Create a new X/Mesa visual. + * Input: display - X11 display + * visinfo - an XVisualInfo pointer + * rgb_flag - GL_TRUE = RGB mode, + * GL_FALSE = color index mode + * alpha_flag - alpha buffer requested? + * db_flag - GL_TRUE = double-buffered, + * GL_FALSE = single buffered + * stereo_flag - stereo visual? + * ximage_flag - GL_TRUE = use an XImage for back buffer, + * GL_FALSE = use an off-screen pixmap for back buffer + * depth_size - requested bits/depth values, or zero + * stencil_size - requested bits/stencil values, or zero + * accum_red_size - requested bits/red accum values, or zero + * accum_green_size - requested bits/green accum values, or zero + * accum_blue_size - requested bits/blue accum values, or zero + * accum_alpha_size - requested bits/alpha accum values, or zero + * num_samples - number of samples/pixel if multisampling, or zero + * level - visual level, usually 0 + * visualCaveat - ala the GLX extension, usually GLX_NONE_EXT + * Return; a new XMesaVisual or 0 if error. + */ +extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display, + XMesaVisualInfo visinfo, + GLboolean rgb_flag, + GLboolean alpha_flag, + GLboolean db_flag, + GLboolean stereo_flag, + GLboolean ximage_flag, + GLint depth_size, + GLint stencil_size, + GLint accum_red_size, + GLint accum_green_size, + GLint accum_blue_size, + GLint accum_alpha_size, + GLint num_samples, + GLint level, + GLint visualCaveat ); + +/* + * Destroy an XMesaVisual, but not the associated XVisualInfo. + */ +extern void XMesaDestroyVisual( XMesaVisual v ); + + + +/* + * Create a new XMesaContext for rendering into an X11 window. + * + * Input: visual - an XMesaVisual + * share_list - another XMesaContext with which to share display + * lists or NULL if no sharing is wanted. + * Return: an XMesaContext or NULL if error. + */ +extern XMesaContext XMesaCreateContext( XMesaVisual v, + XMesaContext share_list ); + + +/* + * Destroy a rendering context as returned by XMesaCreateContext() + */ +extern void XMesaDestroyContext( XMesaContext c ); + + +#ifdef XFree86Server +/* + * These are the extra routines required for integration with XFree86. + * None of these routines should be user visible. -KEM + */ +extern GLboolean XMesaForceCurrent( XMesaContext c ); + +extern GLboolean XMesaLoseCurrent( XMesaContext c ); + +extern GLboolean XMesaCopyContext( XMesaContext src, + XMesaContext dst, + GLuint mask ); +#endif /* XFree86Server */ + + +/* + * Create an XMesaBuffer from an X window. + */ +extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w ); + + +/* + * Create an XMesaBuffer from an X pixmap. + */ +extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v, + XMesaPixmap p, + XMesaColormap cmap ); + + +/* + * Destroy an XMesaBuffer, but not the corresponding window or pixmap. + */ +extern void XMesaDestroyBuffer( XMesaBuffer b ); + + +/* + * Return the XMesaBuffer handle which corresponds to an X drawable, if any. + * + * New in Mesa 2.3. + */ +extern XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy, + XMesaDrawable d ); + + + +/* + * Bind a buffer to a context and make the context the current one. + */ +extern GLboolean XMesaMakeCurrent( XMesaContext c, + XMesaBuffer b ); + + +/* + * Bind two buffers (read and draw) to a context and make the + * context the current one. + * New in Mesa 3.3 + */ +extern GLboolean XMesaMakeCurrent2( XMesaContext c, + XMesaBuffer drawBuffer, + XMesaBuffer readBuffer ); + + +/* + * Unbind the current context from its buffer. + */ +extern GLboolean XMesaUnbindContext( XMesaContext c ); + + +/* + * Return a handle to the current context. + */ +extern XMesaContext XMesaGetCurrentContext( void ); + + +/* + * Return handle to the current (draw) buffer. + */ +extern XMesaBuffer XMesaGetCurrentBuffer( void ); + + +/* + * Return handle to the current read buffer. + * New in Mesa 3.3 + */ +extern XMesaBuffer XMesaGetCurrentReadBuffer( void ); + + +/* + * Swap the front and back buffers for the given buffer. No action is + * taken if the buffer is not double buffered. + */ +extern void XMesaSwapBuffers( XMesaBuffer b ); + + +/* + * Copy a sub-region of the back buffer to the front buffer. + * + * New in Mesa 2.6 + */ +extern void XMesaCopySubBuffer( XMesaBuffer b, + int x, + int y, + int width, + int height ); + + +/* + * Return a pointer to the the Pixmap or XImage being used as the back + * color buffer of an XMesaBuffer. This function is a way to get "under + * the hood" of X/Mesa so one can manipulate the back buffer directly. + * Input: b - the XMesaBuffer + * Output: pixmap - pointer to back buffer's Pixmap, or 0 + * ximage - pointer to back buffer's XImage, or NULL + * Return: GL_TRUE = context is double buffered + * GL_FALSE = context is single buffered + */ +extern GLboolean XMesaGetBackBuffer( XMesaBuffer b, + XMesaPixmap *pixmap, + XMesaImage **ximage ); + + + +/* + * Return the depth buffer associated with an XMesaBuffer. + * Input: b - the XMesa buffer handle + * Output: width, height - size of buffer in pixels + * bytesPerValue - bytes per depth value (2 or 4) + * buffer - pointer to depth buffer values + * Return: GL_TRUE or GL_FALSE to indicate success or failure. + * + * New in Mesa 2.4. + */ +extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b, + GLint *width, + GLint *height, + GLint *bytesPerValue, + void **buffer ); + + + +/* + * Flush/sync a context + */ +extern void XMesaFlush( XMesaContext c ); + + + +/* + * Get an X/Mesa-specific string. + * Input: name - either XMESA_VERSION or XMESA_EXTENSIONS + */ +extern const char *XMesaGetString( XMesaContext c, int name ); + + + +/* + * Scan for XMesaBuffers whose window/pixmap has been destroyed, then free + * any memory used by that buffer. + * + * New in Mesa 2.3. + */ +extern void XMesaGarbageCollect( void ); + + + +/* + * Return a dithered pixel value. + * Input: c - XMesaContext + * x, y - window coordinate + * red, green, blue, alpha - color components in [0,1] + * Return: pixel value + * + * New in Mesa 2.3. + */ +extern unsigned long XMesaDitherColor( XMesaContext xmesa, + GLint x, + GLint y, + GLfloat red, + GLfloat green, + GLfloat blue, + GLfloat alpha ); + + + +/* + * 3Dfx Glide driver only! + * Set 3Dfx/Glide full-screen or window rendering mode. + * Input: mode - either XMESA_FX_WINDOW (window rendering mode) or + * XMESA_FX_FULLSCREEN (full-screen rendering mode) + * Return: GL_TRUE if success + * GL_FALSE if invalid mode or if not using 3Dfx driver + * + * New in Mesa 2.6. + */ +extern GLboolean XMesaSetFXmode( GLint mode ); + + + +/* + * Reallocate the back/depth/stencil/accum/etc/ buffers associated with + * buffer if its size has changed. + * + * New in Mesa 4.0.2 + */ +extern void XMesaResizeBuffers( XMesaBuffer b ); + + + +/* + * Create a pbuffer. + * New in Mesa 4.1 + */ +extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap, + unsigned int width, unsigned int height); + + + +/* + * Texture from Pixmap + * New in Mesa 7.1 + */ +extern void +XMesaBindTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer, + const int *attrib_list); + +extern void +XMesaReleaseTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer); + + +extern XMesaBuffer +XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p, + XMesaColormap cmap, + int format, int target, int mipmap); + + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 98867ac7106..6a6c9ef6004 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -27,7 +27,7 @@ #define XMESAP_H -#include "GL/xmesa.h" +#include "xmesa.h" #include "main/mtypes.h" #if defined(FX) #include "GL/fxmesa.h" diff --git a/src/mesa/drivers/x11/xmesa_x.h b/src/mesa/drivers/x11/xmesa_x.h new file mode 100644 index 00000000000..865bab4313b --- /dev/null +++ b/src/mesa/drivers/x11/xmesa_x.h @@ -0,0 +1,86 @@ + +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +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, sub license, 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 (including the +next paragraph) 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 NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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: + * Kevin E. Martin + * + * When we're building the XMesa driver for stand-alone Mesa we + * include this file when building the xm_*.c files. + * We need to define some types and macros differently when building + * in the Xserver vs. stand-alone Mesa. + */ + +#ifndef _XMESA_X_H_ +#define _XMESA_X_H_ + +typedef Display XMesaDisplay; +typedef Pixmap XMesaPixmap; +typedef Colormap XMesaColormap; +typedef Drawable XMesaDrawable; +typedef Window XMesaWindow; +typedef GC XMesaGC; +typedef XVisualInfo *XMesaVisualInfo; +typedef XImage XMesaImage; +typedef XPoint XMesaPoint; +typedef XColor XMesaColor; + +#define XMesaDestroyImage XDestroyImage + +#define XMesaPutPixel XPutPixel +#define XMesaGetPixel XGetPixel + +#define XMesaSetForeground XSetForeground +#define XMesaSetBackground XSetBackground +#define XMesaSetPlaneMask XSetPlaneMask +#define XMesaSetFunction XSetFunction +#define XMesaSetFillStyle XSetFillStyle +#define XMesaSetTile XSetTile + +#define XMesaDrawPoint XDrawPoint +#define XMesaDrawPoints XDrawPoints +#define XMesaDrawLine XDrawLine +#define XMesaFillRectangle XFillRectangle +#define XMesaGetImage XGetImage +#define XMesaPutImage XPutImage +#define XMesaCopyArea XCopyArea + +#define XMesaCreatePixmap XCreatePixmap +#define XMesaFreePixmap XFreePixmap +#define XMesaFreeGC XFreeGC + +#define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size +#define GET_REDMASK(__v) __v->mesa_visual.redMask +#define GET_GREENMASK(__v) __v->mesa_visual.greenMask +#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask +#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth +#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen) +#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display) +#define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True) + +#endif diff --git a/src/mesa/drivers/x11/xmesa_xf86.h b/src/mesa/drivers/x11/xmesa_xf86.h new file mode 100644 index 00000000000..10f93c3ab62 --- /dev/null +++ b/src/mesa/drivers/x11/xmesa_xf86.h @@ -0,0 +1,198 @@ + +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +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, sub license, 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 (including the +next paragraph) 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 NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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: + * Kevin E. Martin + * + * When we're building the XMesa driver for use in the X server (as the + * indirect render) we include this file when building the xm_*.c files. + * We need to define some types and macros differently when building + * in the Xserver vs. stand-alone Mesa. + */ + +#ifndef _XMESA_XF86_H_ +#define _XMESA_XF86_H_ + +#include "GL/glxtokens.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "servermd.h" + + +typedef struct _XMesaImageRec { + int width, height; + char *data; + int bytes_per_line; /* Padded to 32 bits */ + int bits_per_pixel; +} XMesaImage; + +typedef ScreenRec XMesaDisplay; +typedef PixmapPtr XMesaPixmap; +typedef ColormapPtr XMesaColormap; +typedef DrawablePtr XMesaDrawable; +typedef WindowPtr XMesaWindow; +typedef GCPtr XMesaGC; +typedef VisualPtr XMesaVisualInfo; +typedef DDXPointRec XMesaPoint; +typedef xColorItem XMesaColor; + +#define XMesaSetGeneric(__d,__gc,__val,__mask) \ +do { \ + CARD32 __v[1]; \ + (void) __d; \ + __v[0] = __val; \ + dixChangeGC(NullClient, __gc, __mask, __v, NULL); \ +} while (0) + +#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \ +do { \ + ChangeGCVal __v[1]; \ + (void) __d; \ + __v[0].ptr = __pval; \ + dixChangeGC(NullClient, __gc, __mask, NULL, __v); \ +} while (0) + +#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground) +#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground) +#define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask) +#define XMesaSetFunction(d,gc,v) XMesaSetGeneric(d,gc,v,GCFunction) +#define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle) + +#define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile) + +#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \ +do { \ + XMesaPoint __p[1]; \ + (void) __d; \ + __p[0].x = __x; \ + __p[0].y = __y; \ + ValidateGC(__b, __gc); \ + (*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \ +} while (0) + +#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \ +do { \ + (void) __d; \ + ValidateGC(__b, __gc); \ + (*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \ +} while (0) + +#define XMesaDrawLine(__d, __b, __gc, __x0, __y0, __x1, __y1) \ +do { \ + XMesaPoint __p[2]; \ + (void) __d; \ + __p[0].x = __x0; \ + __p[0].y = __y0; \ + __p[1].x = __x1; \ + __p[1].y = __y1; \ + ValidateGC(__b, __gc); \ + (*gc->ops->PolyLines)(__b, __gc, CoordModeOrigin, 2, __p); \ +} while (0) + +#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \ +do { \ + xRectangle __r[1]; \ + (void) __d; \ + ValidateGC((DrawablePtr)__b, __gc); \ + __r[0].x = __x; \ + __r[0].y = __y; \ + __r[0].width = __w; \ + __r[0].height = __h; \ + (*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \ +} while (0) + +static _X_INLINE XMesaImage *XMesaGetImage(XMesaDisplay *dpy, PixmapPtr p, int x, + int y, unsigned int width, + unsigned int height, + unsigned long plane_mask, int format) +{ + XMesaImage *img = Xcalloc(sizeof(*img)); + + img->width = p->drawable.width; + img->height = p->drawable.height; + img->bits_per_pixel = p->drawable.bitsPerPixel; + img->bytes_per_line = PixmapBytePad(width, p->drawable.depth); + img->data = malloc(height * img->bytes_per_line); + + /* Assumes: Images are always in ZPixmap format */ + (*p->drawable.pScreen->GetImage)(&p->drawable, x, y, width, height, + plane_mask, ZPixmap, img->data); + + return img; +} + +#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \ +do { \ + /* Assumes: Images are always in ZPixmap format */ \ + (void) __d; \ + ASSERT(!__sx && !__sy); /* The SubImage case */ \ + ValidateGC(__b, __gc); \ + (*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \ + __x, __y, __w, __h, 0, ZPixmap, \ + ((XMesaImage *)(__i))->data); \ +} while (0) + +#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \ +do { \ + (void) __d; \ + ValidateGC(__db, __gc); \ + (*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \ + __sx, __sy, __w, __h, __x, __y); \ +} while (0) + + +/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ +#ifdef CREATE_PIXMAP_USAGE_SCRATCH +#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ + (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) +#else +#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ + (*__d->CreatePixmap)(__d, __w, __h, __depth) +#endif + +#define XMesaFreePixmap(__d,__b) \ + (*__d->DestroyPixmap)(__b) + +#define XMesaFreeGC(__d,__gc) \ +do { \ + (void) __d; \ + FreeScratchGC(__gc); \ +} while (0) + +#define GET_COLORMAP_SIZE(__v) __v->ColormapEntries +#define GET_REDMASK(__v) __v->mesa_visual.redMask +#define GET_GREENMASK(__v) __v->mesa_visual.greenMask +#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask +#define GET_VISUAL_DEPTH(__v) __v->nplanes +#define GET_BLACK_PIXEL(__v) __v->display->blackPixel +#define CHECK_BYTE_ORDER(__v) GL_TRUE +#define CHECK_FOR_HPCR(__v) GL_FALSE + +#endif -- cgit v1.2.3 From d25cc16efa356a92f61f0b4836bcbd0b4cb606d2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 12:00:27 -0700 Subject: mesa: remove the ancient include/GL/ugl*.h headers --- include/GL/uglglutshapes.h | 45 ------------- include/GL/uglmesa.h | 155 --------------------------------------------- 2 files changed, 200 deletions(-) delete mode 100644 include/GL/uglglutshapes.h delete mode 100644 include/GL/uglmesa.h diff --git a/include/GL/uglglutshapes.h b/include/GL/uglglutshapes.h deleted file mode 100644 index 28192de2d52..00000000000 --- a/include/GL/uglglutshapes.h +++ /dev/null @@ -1,45 +0,0 @@ -/* uglglutshapes.h - Public header GLUT Shapes */ - -/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ - -/* This program is freely distributable without licensing fees and is - provided without guarantee or warrantee expressed or implied. This - program is -not- in the public domain. */ - -#ifndef GLUTSHAPES_H -#define GLUTSHAPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void glutWireSphere (GLdouble radius, GLint slices, GLint stacks); -void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks); -void glutWireCone (GLdouble base, GLdouble height, - GLint slices, GLint stacks); -void glutSolidCone (GLdouble base, GLdouble height, - GLint slices, GLint stacks); -void glutWireCube (GLdouble size); -void glutSolidCube (GLdouble size); -void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius, - GLint sides, GLint rings); -void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius, - GLint sides, GLint rings); -void glutWireDodecahedron (void); -void glutSolidDodecahedron (void); -void glutWireOctahedron (void); -void glutSolidOctahedron (void); -void glutWireTetrahedron (void); -void glutSolidTetrahedron (void); -void glutWireIcosahedron (void); -void glutSolidIcosahedron (void); -void glutWireTeapot (GLdouble size); -void glutSolidTeapot (GLdouble size); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/GL/uglmesa.h b/include/GL/uglmesa.h deleted file mode 100644 index 7ef5843504e..00000000000 --- a/include/GL/uglmesa.h +++ /dev/null @@ -1,155 +0,0 @@ -/* uglmesa.h - Public header UGL/Mesa */ - -/* Copyright (C) 2001 by Wind River Systems, Inc */ - -/* - * Mesa 3-D graphics library - * Version: 4.0 - * - * The MIT License - * 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 - * THE AUTHORS OR COPYRIGHT 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. - */ - -/* - * Author: - * Stephane Raimbault - */ - -#ifndef UGLMESA_H -#define UGLMESA_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define UGL_MESA_MAJOR_VERSION 4 -#define UGL_MESA_MINOR_VERSION 0 - -#include -#include - -/* - * Values for display mode of uglMesaCreateContext () - */ - -/* - * With these mask values, it's possible to test double buffer mode - * with UGL_MESA_DOUBLE mask - * - * SINGLE 0000 0001 - * DOUBLE 0000 0110 - * - SOFT 0000 0010 - * - HARD 0000 0100 - * WINDML 0001 0000 - * - * - */ -#define UGL_MESA_SINGLE 0x01 -#define UGL_MESA_DOUBLE 0x06 -#define UGL_MESA_DOUBLE_SOFTWARE 0x02 -#define UGL_MESA_DOUBLE_HARDWARE 0x04 - -#define UGL_MESA_WINDML_EXCLUSIVE 0x10 - -#define UGL_MESA_FULLSCREEN_WIDTH 0x0 -#define UGL_MESA_FULLSCREEN_HEIGHT 0x0 - -/* - * uglMesaPixelStore() parameters: - */ - -#define UGL_MESA_ROW_LENGTH 0x20 -#define UGL_MESA_Y_UP 0x21 - -/* - * Accepted by uglMesaGetIntegerv: - */ - -#define UGL_MESA_LEFT_X 0x01 -#define UGL_MESA_TOP_Y 0x02 -#define UGL_MESA_WIDTH 0x03 -#define UGL_MESA_HEIGHT 0x04 -#define UGL_MESA_DISPLAY_WIDTH 0x05 -#define UGL_MESA_DISPLAY_HEIGHT 0x06 -#define UGL_MESA_COLOR_FORMAT 0x07 -#define UGL_MESA_COLOR_MODEL 0x08 -#define UGL_MESA_PIXEL_FORMAT 0x09 -#define UGL_MESA_TYPE 0x0A -#define UGL_MESA_RGB 0x0B -#define UGL_MESA_COLOR_INDEXED 0x0C -#define UGL_MESA_SINGLE_BUFFER 0x0D -#define UGL_MESA_DOUBLE_BUFFER 0x0E -#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F -#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10 - -/* - * typedefs - */ - -typedef struct uglMesaContext * UGL_MESA_CONTEXT; - -UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode, - UGL_MESA_CONTEXT share_list); - -UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode, - GLint depth_bits, - GLint stencil_bits, - GLint accum_red_bits, - GLint accum_green_bits, - GLint accum_blue_bits, - GLint accum_alpha_bits, - UGL_MESA_CONTEXT share_list); - -GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc, - GLsizei left, GLsizei top, - GLsizei width, GLsizei height); - -GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy); - -GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top); - -GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh); - -GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height); - -void uglMesaDestroyContext (void); - -UGL_MESA_CONTEXT uglMesaGetCurrentContext (void); - -void uglMesaSwapBuffers (void); - -void uglMesaPixelStore (GLint pname, GLint value); - -void uglMesaGetIntegerv (GLint pname, GLint *value); - -GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer); - -GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height, - GLint *format, void **buffer); - -GLboolean uglMesaSetColor (GLubyte index, GLfloat red, - GLfloat green, GLfloat blue); - -#ifdef __cplusplus -} -#endif - - -#endif -- cgit v1.2.3 From f5979b0c159d1d3839caf86072639f5d96a5b0b5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 12:01:40 -0700 Subject: mesa: deprecate the GL/fxmesa.h header --- include/GL/fxmesa.h | 103 ------------------------------------------ src/mesa/drivers/x11/fxmesa.h | 103 ++++++++++++++++++++++++++++++++++++++++++ src/mesa/drivers/x11/xmesaP.h | 2 +- 3 files changed, 104 insertions(+), 104 deletions(-) delete mode 100644 include/GL/fxmesa.h create mode 100644 src/mesa/drivers/x11/fxmesa.h diff --git a/include/GL/fxmesa.h b/include/GL/fxmesa.h deleted file mode 100644 index f8e9661f9cc..00000000000 --- a/include/GL/fxmesa.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * Copyright (C) 1995-2001 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * FXMesa - 3Dfx Glide driver for Mesa. Contributed by David Bucciarelli - * - * NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide) - */ - - -#ifndef FXMESA_H -#define FXMESA_H - - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define FXMESA_MAJOR_VERSION 6 -#define FXMESA_MINOR_VERSION 3 - - -/* - * Values for attribList parameter to fxMesaCreateContext(): - */ -#define FXMESA_NONE 0 /* to terminate attribList */ -#define FXMESA_DOUBLEBUFFER 10 -#define FXMESA_ALPHA_SIZE 11 /* followed by an integer */ -#define FXMESA_DEPTH_SIZE 12 /* followed by an integer */ -#define FXMESA_STENCIL_SIZE 13 /* followed by an integer */ -#define FXMESA_ACCUM_SIZE 14 /* followed by an integer */ -#define FXMESA_COLORDEPTH 20 /* followed by an integer */ -#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with xmesa1.c! */ - - - -typedef struct tfxMesaContext *fxMesaContext; - - -#if defined (__BEOS__) -#pragma export on -#endif - - -GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, GrScreenResolution_t, - GrScreenRefresh_t, - const GLint attribList[]); - -GLAPI fxMesaContext GLAPIENTRY fxMesaCreateBestContext(GLuint win, - GLint width, GLint height, - const GLint attribList[]); -GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx); - -GLAPI GLint GLAPIENTRY fxMesaSelectCurrentBoard(int n); - -GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx); - -GLAPI fxMesaContext GLAPIENTRY fxMesaGetCurrentContext(void); - -GLAPI void GLAPIENTRY fxMesaSwapBuffers(void); - -GLAPI void GLAPIENTRY fxMesaSetNearFar(GLfloat nearVal, GLfloat farVal); - -GLAPI void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext ctx); - -GLAPI void GLAPIENTRY fxCloseHardware(void); - -GLAPI void GLAPIENTRY fxGetScreenGeometry (GLint *w, GLint *h); - - -#if defined (__BEOS__) -#pragma export off -#endif - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/src/mesa/drivers/x11/fxmesa.h b/src/mesa/drivers/x11/fxmesa.h new file mode 100644 index 00000000000..f8e9661f9cc --- /dev/null +++ b/src/mesa/drivers/x11/fxmesa.h @@ -0,0 +1,103 @@ +/* + * Mesa 3-D graphics library + * Version: 4.0 + * Copyright (C) 1995-2001 Brian Paul + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +/* + * FXMesa - 3Dfx Glide driver for Mesa. Contributed by David Bucciarelli + * + * NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide) + */ + + +#ifndef FXMESA_H +#define FXMESA_H + + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +#define FXMESA_MAJOR_VERSION 6 +#define FXMESA_MINOR_VERSION 3 + + +/* + * Values for attribList parameter to fxMesaCreateContext(): + */ +#define FXMESA_NONE 0 /* to terminate attribList */ +#define FXMESA_DOUBLEBUFFER 10 +#define FXMESA_ALPHA_SIZE 11 /* followed by an integer */ +#define FXMESA_DEPTH_SIZE 12 /* followed by an integer */ +#define FXMESA_STENCIL_SIZE 13 /* followed by an integer */ +#define FXMESA_ACCUM_SIZE 14 /* followed by an integer */ +#define FXMESA_COLORDEPTH 20 /* followed by an integer */ +#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with xmesa1.c! */ + + + +typedef struct tfxMesaContext *fxMesaContext; + + +#if defined (__BEOS__) +#pragma export on +#endif + + +GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, GrScreenResolution_t, + GrScreenRefresh_t, + const GLint attribList[]); + +GLAPI fxMesaContext GLAPIENTRY fxMesaCreateBestContext(GLuint win, + GLint width, GLint height, + const GLint attribList[]); +GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx); + +GLAPI GLint GLAPIENTRY fxMesaSelectCurrentBoard(int n); + +GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx); + +GLAPI fxMesaContext GLAPIENTRY fxMesaGetCurrentContext(void); + +GLAPI void GLAPIENTRY fxMesaSwapBuffers(void); + +GLAPI void GLAPIENTRY fxMesaSetNearFar(GLfloat nearVal, GLfloat farVal); + +GLAPI void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext ctx); + +GLAPI void GLAPIENTRY fxCloseHardware(void); + +GLAPI void GLAPIENTRY fxGetScreenGeometry (GLint *w, GLint *h); + + +#if defined (__BEOS__) +#pragma export off +#endif + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 6a6c9ef6004..65e747d7b9d 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -30,7 +30,7 @@ #include "xmesa.h" #include "main/mtypes.h" #if defined(FX) -#include "GL/fxmesa.h" +#include "fxmesa.h" #include "xm_glide.h" #endif #ifdef XFree86Server -- cgit v1.2.3 From 287102ddcc72ae19f7e6b912205805c5e78771f7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 12:04:39 -0700 Subject: mesa: deprecate GL/amesa.h header (allegro driver) --- include/GL/amesa.h | 65 ---------------------------------------- src/mesa/drivers/allegro/amesa.c | 2 +- src/mesa/drivers/allegro/amesa.h | 65 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 66 deletions(-) delete mode 100644 include/GL/amesa.h create mode 100644 src/mesa/drivers/allegro/amesa.h diff --git a/include/GL/amesa.h b/include/GL/amesa.h deleted file mode 100644 index 852d34cf4f5..00000000000 --- a/include/GL/amesa.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.3 - * - * Copyright (C) 1999-2000 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. - */ - - -/* Allegro (DJGPP) driver by Bernhard Tschirren (bernie-t@geocities.com) */ - - -#ifndef AMESA_H -#define AMESA_H - - -#define AMESA_MAJOR_VERSION 3 -#define AMESA_MINOR_VERSION 3 - - -typedef struct amesa_visual *AMesaVisual; -typedef struct amesa_buffer *AMesaBuffer; -typedef struct amesa_context *AMesaContext; - - -extern AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth, - GLint depthSize, - GLint stencilSize, - GLint accumSize); - -extern void AMesaDestroyVisual(AMesaVisual visual); - -extern AMesaBuffer AMesaCreateBuffer(AMesaVisual visual, - GLint width, GLint height); - -extern void AMesaDestroyBuffer(AMesaBuffer buffer); - - -extern AMesaContext AMesaCreateContext(AMesaVisual visual, - AMesaContext sharelist); - -extern void AMesaDestroyContext(AMesaContext context); - -extern GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer); - -extern void AMesaSwapBuffers(AMesaBuffer buffer); - - -#endif /* AMESA_H */ diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c index ade62518489..a9d8f62f92d 100644 --- a/src/mesa/drivers/allegro/amesa.c +++ b/src/mesa/drivers/allegro/amesa.c @@ -26,7 +26,7 @@ #include "main/imports.h" #include "main/matrix.h" #include "main/mtypes.h" -#include "GL/amesa.h" +#include "amesa.h" struct amesa_visual diff --git a/src/mesa/drivers/allegro/amesa.h b/src/mesa/drivers/allegro/amesa.h new file mode 100644 index 00000000000..852d34cf4f5 --- /dev/null +++ b/src/mesa/drivers/allegro/amesa.h @@ -0,0 +1,65 @@ +/* + * Mesa 3-D graphics library + * Version: 3.3 + * + * Copyright (C) 1999-2000 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. + */ + + +/* Allegro (DJGPP) driver by Bernhard Tschirren (bernie-t@geocities.com) */ + + +#ifndef AMESA_H +#define AMESA_H + + +#define AMESA_MAJOR_VERSION 3 +#define AMESA_MINOR_VERSION 3 + + +typedef struct amesa_visual *AMesaVisual; +typedef struct amesa_buffer *AMesaBuffer; +typedef struct amesa_context *AMesaContext; + + +extern AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth, + GLint depthSize, + GLint stencilSize, + GLint accumSize); + +extern void AMesaDestroyVisual(AMesaVisual visual); + +extern AMesaBuffer AMesaCreateBuffer(AMesaVisual visual, + GLint width, GLint height); + +extern void AMesaDestroyBuffer(AMesaBuffer buffer); + + +extern AMesaContext AMesaCreateContext(AMesaVisual visual, + AMesaContext sharelist); + +extern void AMesaDestroyContext(AMesaContext context); + +extern GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer); + +extern void AMesaSwapBuffers(AMesaBuffer buffer); + + +#endif /* AMESA_H */ -- cgit v1.2.3 From c3a00a728b15a13a33a38c8687ed6732c98d2260 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 12:06:29 -0700 Subject: mesa: remove deprecated headers from Makefile.am --- include/GL/Makefile.am | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/GL/Makefile.am b/include/GL/Makefile.am index 199bd5c8f3c..ca528f606df 100644 --- a/include/GL/Makefile.am +++ b/include/GL/Makefile.am @@ -2,17 +2,12 @@ GLincludedir = $(includedir)/GL -INC_FX = fxmesa.h INC_GGI = ggimesa.h INC_OSMESA = osmesa.h INC_SVGA = svgamesa.h -INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h +INC_X11 = glx.h glxext.h glx_mangle.h INC_GLUT = glut.h glutf90.h -if HAVE_FX -sel_inc_fx = $(INC_FX) -endif - if HAVE_GGI sel_inc_ggi = $(INC_GGI) endif @@ -35,9 +30,9 @@ endif EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \ vms_x_fix.h wmesa.h \ - $(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT) + $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT) GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \ - $(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \ + $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \ $(sel_inc_x11) $(sel_inc_glut) include $(top_srcdir)/common_rules.make -- cgit v1.2.3 From ef193c10e7b3f048abf5fce0d7dc4d72d94ba123 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 12:07:58 -0700 Subject: mesa: remove old GLView.h header for BeOS --- include/GLView.h | 192 ------------------------------------------------------- 1 file changed, 192 deletions(-) delete mode 100644 include/GLView.h diff --git a/include/GLView.h b/include/GLView.h deleted file mode 100644 index 8d9d25bb1cb..00000000000 --- a/include/GLView.h +++ /dev/null @@ -1,192 +0,0 @@ -/******************************************************************************* -/ -/ File: GLView.h -/ -/ Copyright 1993-98, Be Incorporated, All Rights Reserved. -/ -*******************************************************************************/ - -#ifndef BGLVIEW_H -#define BGLVIEW_H - -#include - -#define BGL_RGB 0 -#define BGL_INDEX 1 -#define BGL_SINGLE 0 -#define BGL_DOUBLE 2 -#define BGL_DIRECT 0 -#define BGL_INDIRECT 4 -#define BGL_ACCUM 8 -#define BGL_ALPHA 16 -#define BGL_DEPTH 32 -#define BGL_OVERLAY 64 -#define BGL_UNDERLAY 128 -#define BGL_STENCIL 512 - -#ifdef __cplusplus - - -#include -#include -#include -#include -#include -#include - -class BGLView : public BView { -public: - - BGLView(BRect rect, char *name, - ulong resizingMode, ulong mode, - ulong options); -virtual ~BGLView(); - - void LockGL(); - void UnlockGL(); - void SwapBuffers(); - void SwapBuffers( bool vSync ); - BView * EmbeddedView(); - status_t CopyPixelsOut(BPoint source, BBitmap *dest); - status_t CopyPixelsIn(BBitmap *source, BPoint dest); -virtual void ErrorCallback(unsigned long errorCode); // Mesa's GLenum is uint where Be's ones was ulong! - -virtual void Draw(BRect updateRect); - -virtual void AttachedToWindow(); -virtual void AllAttached(); -virtual void DetachedFromWindow(); -virtual void AllDetached(); - -virtual void FrameResized(float width, float height); -virtual status_t Perform(perform_code d, void *arg); - - /* The public methods below, for the moment, - are just pass-throughs to BView */ - -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void MessageReceived(BMessage *msg); -virtual void SetResizingMode(uint32 mode); - -virtual void Show(); -virtual void Hide(); - -virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index, - BMessage *specifier, int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -/* New public functions */ - void DirectConnected( direct_buffer_info *info ); - void EnableDirectMode( bool enabled ); - - void * getGC() { return m_gc; } - -private: - -virtual void _ReservedGLView1(); -virtual void _ReservedGLView2(); -virtual void _ReservedGLView3(); -virtual void _ReservedGLView4(); -virtual void _ReservedGLView5(); -virtual void _ReservedGLView6(); -virtual void _ReservedGLView7(); -virtual void _ReservedGLView8(); - - BGLView(const BGLView &); - BGLView &operator=(const BGLView &); - - void dither_front(); - bool confirm_dither(); - void draw(BRect r); - - void * m_gc; - uint32 m_options; - uint32 m_ditherCount; - BLocker m_drawLock; - BLocker m_displayLock; - void * m_clip_info; - void * _Unused1; - - BBitmap * m_ditherMap; - BRect m_bounds; - int16 * m_errorBuffer[2]; - uint64 _reserved[8]; - - /* Direct Window stuff */ -private: - void drawScanline( int x1, int x2, int y, void *data ); -static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2); - - void lock_draw(); - void unlock_draw(); - bool validateView(); -}; - - - -class BGLScreen : public BWindowScreen { -public: - BGLScreen(char *name, - ulong screenMode, ulong options, - status_t *error, bool debug=false); - ~BGLScreen(); - - void LockGL(); - void UnlockGL(); - void SwapBuffers(); - virtual void ErrorCallback(GLenum errorCode); - - virtual void ScreenConnected(bool connected); - virtual void FrameResized(float width, float height); - virtual status_t Perform(perform_code d, void *arg); - - /* The public methods below, for the moment, - are just pass-throughs to BWindowScreen */ - - virtual status_t Archive(BMessage *data, bool deep = true) const; - virtual void MessageReceived(BMessage *msg); - - virtual void Show(); - virtual void Hide(); - - virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); - virtual status_t GetSupportedSuites(BMessage *data); - -private: - - virtual void _ReservedGLScreen1(); - virtual void _ReservedGLScreen2(); - virtual void _ReservedGLScreen3(); - virtual void _ReservedGLScreen4(); - virtual void _ReservedGLScreen5(); - virtual void _ReservedGLScreen6(); - virtual void _ReservedGLScreen7(); - virtual void _ReservedGLScreen8(); - - BGLScreen(const BGLScreen &); - BGLScreen &operator=(const BGLScreen &); - - void * m_gc; - long m_options; - BLocker m_drawLock; - - int32 m_colorSpace; - uint32 m_screen_mode; - - uint64 _reserved[7]; -}; - -#endif // __cplusplus - -#endif // BGLVIEW_H - - - - - -- cgit v1.2.3 From 834db8215362ca859ad4ef18441936238d1b6670 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 12:09:08 -0700 Subject: docs: document deprecated/removed headers/interfaces --- docs/relnotes-7.3.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html index c00e5fe2f80..c4866140115 100644 --- a/docs/relnotes-7.3.html +++ b/docs/relnotes-7.3.html @@ -47,6 +47,11 @@ tbd

      Changes

        +
      • Deprecated the "XMesa" interface (include/GL/xmesa*.h files) +
      • Deprecated the "FXMesa" interface (include/GL/fxmesa.h file) +
      • Deprecated the "Allegro" interface (include/GL/amesa.h file) +
      • Removed include/GL/uglmesa.h header +
      • Removed include/GLView.h header for BeOS
      -- cgit v1.2.3 From f1455ca5f411ee8f7d992682e3e9c55d82e75715 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Jan 2009 12:21:37 -0700 Subject: mesa: omit old headers from tarball --- Makefile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Makefile b/Makefile index dbe444d2941..5a473757662 100644 --- a/Makefile +++ b/Makefile @@ -200,9 +200,7 @@ MAIN_FILES = \ $(DIRECTORY)/docs/RELNOTES* \ $(DIRECTORY)/docs/*.spec \ $(DIRECTORY)/include/GL/internal/glcore.h \ - $(DIRECTORY)/include/GL/amesa.h \ $(DIRECTORY)/include/GL/dmesa.h \ - $(DIRECTORY)/include/GL/fxmesa.h \ $(DIRECTORY)/include/GL/ggimesa.h \ $(DIRECTORY)/include/GL/gl.h \ $(DIRECTORY)/include/GL/glext.h \ @@ -217,13 +215,8 @@ MAIN_FILES = \ $(DIRECTORY)/include/GL/mglmesa.h \ $(DIRECTORY)/include/GL/osmesa.h \ $(DIRECTORY)/include/GL/svgamesa.h \ - $(DIRECTORY)/include/GL/ugl*.h \ $(DIRECTORY)/include/GL/vms_x_fix.h \ $(DIRECTORY)/include/GL/wmesa.h \ - $(DIRECTORY)/include/GL/xmesa.h \ - $(DIRECTORY)/include/GL/xmesa_x.h \ - $(DIRECTORY)/include/GL/xmesa_xf86.h \ - $(DIRECTORY)/include/GLView.h \ $(DIRECTORY)/src/Makefile \ $(DIRECTORY)/src/descrip.mms \ $(DIRECTORY)/src/mesa/Makefile* \ -- cgit v1.2.3 From 44557bf065b89abc45c24829c6ba7395925463e8 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 10 Jan 2009 16:32:32 -0700 Subject: mesa: require libdrm 2.4.3 in configure.ac --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 97cb298d399..d3a93645e80 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_CONFIG_AUX_DIR([bin]) AC_CANONICAL_HOST dnl Versions for external dependencies -LIBDRM_REQUIRED=2.3.1 +LIBDRM_REQUIRED=2.4.3 DRI2PROTO_REQUIRED=1.99.3 dnl Check for progs -- cgit v1.2.3 From 297a9606ead4400a60a1b5106327c226db4b3474 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sat, 13 Sep 2008 19:07:28 +0200 Subject: __builtin_expect is a gcc 3.x feature. define it out for gcc 2.95. Patch suggested by miod@. Thanks. --- src/mesa/glapi/glthread.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index e2765cebb10..27ccd2e2e7b 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -298,6 +298,10 @@ _glthread_GetTSD(_glthread_TSD *); extern void _glthread_SetTSD(_glthread_TSD *, void *); +#if !defined __GNUC__ || __GNUC__ < 3 +# define __builtin_expect(x, y) x +#endif + #if defined(GLX_USE_TLS) extern __thread struct _glapi_table * _glapi_tls_Dispatch -- cgit v1.2.3 From b4866f8a5229d4769a49b4c54a1675a61497d206 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Sun, 11 Jan 2009 20:40:07 +0000 Subject: Fix build with GCC 2.95. --- src/glx/x11/glx_pbuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glx/x11/glx_pbuffer.c b/src/glx/x11/glx_pbuffer.c index c63d53439d5..a602cd28817 100644 --- a/src/glx/x11/glx_pbuffer.c +++ b/src/glx/x11/glx_pbuffer.c @@ -220,14 +220,14 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable, unsigned int length; unsigned int i; unsigned int num_attributes; + GLboolean use_glx_1_3; if ((dpy == NULL) || (drawable == 0)) { return 0; } priv = __glXInitialize(dpy); - GLboolean use_glx_1_3 = ((priv->majorVersion > 1) - || (priv->minorVersion >= 3)); + use_glx_1_3 = ((priv->majorVersion > 1) || (priv->minorVersion >= 3)); *value = 0; -- cgit v1.2.3 From 356428d4e4dba433b405f63ff918d76eaf4b4215 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 14 Sep 2008 20:58:29 +0200 Subject: replace nearbyint() by rint() for now. --- src/mesa/drivers/dri/i965/brw_sf_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c index 506126fcfb0..741a7c53c47 100644 --- a/src/mesa/drivers/dri/i965/brw_sf_state.c +++ b/src/mesa/drivers/dri/i965/brw_sf_state.c @@ -229,7 +229,7 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key, /* XXX clamp max depends on AA vs. non-AA */ sf.sf7.sprite_point = key->point_sprite; - sf.sf7.point_size = CLAMP(nearbyint(key->point_size), 1, 255) * (1<<3); + sf.sf7.point_size = CLAMP(rint(key->point_size), 1, 255) * (1<<3); sf.sf7.use_point_size_state = !key->point_attenuated; sf.sf7.aa_line_distance_mode = 0; -- cgit v1.2.3 From 33f6dc3c334cc065d7c98d0481be19b208e1837d Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 21 Sep 2008 10:56:57 +0200 Subject: build fix on big endian OpenBSD architectures. --- src/mesa/drivers/dri/mach64/mach64_context.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h index 55e0618ff80..854751626d0 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.h +++ b/src/mesa/drivers/dri/mach64/mach64_context.h @@ -294,7 +294,13 @@ extern GLboolean mach64UnbindContext( __DRIcontextPrivate *driContextPriv ); #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) #define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0) #else +#ifndef __OpenBSD__ #include +#else +#include +#define bswap_32 bswap32 +#endif + #define LE32_IN( x ) bswap_32( *(GLuint *)(x) ) #define LE32_IN_FLOAT( x ) \ ({ \ -- cgit v1.2.3 From 0f0922f93cbe997a95575c955ab1544bb5cd1d7d Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sat, 11 Oct 2008 08:51:43 +0200 Subject: Big endian fixes. --- src/mesa/main/glheader.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 1d0f178dc4a..626806d35f6 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -146,7 +146,8 @@ #include #define CPU_TO_LE32( x ) bswap_32( x ) #else /*__linux__*/ -#define CPU_TO_LE32( x ) ( x ) /* fix me for non-Linux big-endian! */ +#include +#define CPU_TO_LE32( x ) bswap32( x ) #endif /*__linux__*/ #define MESA_BIG_ENDIAN 1 #else -- cgit v1.2.3 From 436024561aa6d78f78601f690803bd3845d225e7 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 11 Jan 2009 16:56:34 -0700 Subject: Build fixes for gcc 2.95 --- src/glx/x11/drisw_glx.c | 6 +++--- src/glx/x11/glxcurrent.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index fee45952b38..35bbd9151ca 100644 --- a/src/glx/x11/drisw_glx.c +++ b/src/glx/x11/drisw_glx.c @@ -113,7 +113,7 @@ swrastGetDrawableInfo(__DRIdrawable * draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { __GLXDRIdrawablePrivate *pdp = loaderPrivate; - __GLXDRIdrawable *pdraw = &(pdp->base);; + __GLXDRIdrawable *pdraw = &(pdp->base); Display *dpy = pdraw->psc->dpy; Drawable drawable; @@ -141,7 +141,7 @@ swrastPutImage(__DRIdrawable * draw, int op, int x, int y, int w, int h, char *data, void *loaderPrivate) { __GLXDRIdrawablePrivate *pdp = loaderPrivate; - __GLXDRIdrawable *pdraw = &(pdp->base);; + __GLXDRIdrawable *pdraw = &(pdp->base); Display *dpy = pdraw->psc->dpy; Drawable drawable; XImage *ximage; @@ -176,7 +176,7 @@ swrastGetImage(__DRIdrawable * draw, int x, int y, int w, int h, char *data, void *loaderPrivate) { __GLXDRIdrawablePrivate *pdp = loaderPrivate; - __GLXDRIdrawable *pdraw = &(pdp->base);; + __GLXDRIdrawable *pdraw = &(pdp->base); Display *dpy = pdraw->psc->dpy; Drawable drawable; XImage *ximage; diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c index f3eb045d9f9..5af46cf0ba7 100644 --- a/src/glx/x11/glxcurrent.c +++ b/src/glx/x11/glxcurrent.c @@ -365,7 +365,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, const CARD8 oldOpcode = ((gc == oldGC) || (oldGC == &dummyContext)) ? opcode : __glXSetupForCommand(oldGC->currentDpy); Bool bindReturnValue; - + __GLXattribute *state; if (!opcode || !oldOpcode) { return GL_FALSE; @@ -489,8 +489,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, } while (0); #endif - __GLXattribute *state = - (__GLXattribute *) (gc->client_state_private); + state = (__GLXattribute *) (gc->client_state_private); gc->currentContextTag = reply.contextTag; if (state->array_state == NULL) { -- cgit v1.2.3 From 1598be5083758c1c289be16ee01665865ed0fb62 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 12 Jan 2009 07:55:14 -0700 Subject: mesa: add osmesa.pc.in to tarball list --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 5a473757662..5197e4967b3 100644 --- a/Makefile +++ b/Makefile @@ -223,6 +223,7 @@ MAIN_FILES = \ $(DIRECTORY)/src/mesa/sources \ $(DIRECTORY)/src/mesa/descrip.mms \ $(DIRECTORY)/src/mesa/gl.pc.in \ + $(DIRECTORY)/src/mesa/osmesa.pc.in \ $(DIRECTORY)/src/mesa/depend \ $(DIRECTORY)/src/mesa/main/*.[chS] \ $(DIRECTORY)/src/mesa/main/descrip.mms \ -- cgit v1.2.3 From 88fdddcbbe690c52f91f76216298700c370f9650 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 12 Jan 2009 08:35:53 -0700 Subject: windows: added new sources for 7.3 (may be more, needs testing) --- windows/VC8/mesa/mesa/mesa.vcproj | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/windows/VC8/mesa/mesa/mesa.vcproj b/windows/VC8/mesa/mesa/mesa.vcproj index 91e1849669d..9b11098d543 100644 --- a/windows/VC8/mesa/mesa/mesa.vcproj +++ b/windows/VC8/mesa/mesa/mesa.vcproj @@ -179,6 +179,10 @@ RelativePath="..\..\..\..\src\mesa\main\api_arrayelt.c" > + + @@ -327,6 +331,10 @@ /> + + @@ -465,6 +473,10 @@ RelativePath="..\..\..\..\src\mesa\main\mm.c" > + + @@ -481,6 +493,10 @@ RelativePath="..\..\..\..\src\mesa\main\pixel.c" > + + @@ -857,6 +873,10 @@ RelativePath="..\..\..\..\src\mesa\tnl\t_pipeline.c" > + + @@ -921,6 +941,10 @@ RelativePath="..\..\..\..\src\mesa\main\texcompress_s3tc.c" > + + @@ -929,6 +953,10 @@ RelativePath="..\..\..\..\src\mesa\main\texformat.c" > + + @@ -937,6 +965,10 @@ RelativePath="..\..\..\..\src\mesa\main\texobj.c" > + + @@ -1346,6 +1378,10 @@ RelativePath="..\..\..\..\src\mesa\main\polygon.h" > + + @@ -1522,6 +1558,10 @@ RelativePath="..\..\..\..\src\mesa\shader\shader_api.h" > + + -- cgit v1.2.3 From 06fdb6a74cfdddb5f598ddfeab890c59f176dab8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 12 Jan 2009 08:52:54 -0700 Subject: glsl: better fix for for-loop scope issue (commit 6333005f7aea3e5d1d86a5c47b3fa2a1ed2f3ff0) --- src/mesa/shader/slang/library/slang_shader.syn | 13 +++---------- src/mesa/shader/slang/library/slang_shader_syn.h | 4 +--- src/mesa/shader/slang/slang_compile.c | 18 ------------------ 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn index 0ad4a1cba62..cc5c70a02f8 100644 --- a/src/mesa/shader/slang/library/slang_shader.syn +++ b/src/mesa/shader/slang/library/slang_shader.syn @@ -1161,13 +1161,6 @@ compound_statement_2 compound_statement_3 lbrace .and statement_list .and rbrace; -/* - * ::= - * | - */ -statement_no_new_scope - compound_statement_no_new_scope .or simple_statement; - /* * ::= "{" "}" * | "{" "}" @@ -1181,6 +1174,7 @@ compound_statement_no_new_scope_2 compound_statement_no_new_scope_3 lbrace .and statement_list .and rbrace; + /* * ::= * | @@ -1242,8 +1236,7 @@ condition_3 /* * ::= "while" "(" ")" * | "do" "while" "(" ")" ";" - * | "for" "(" ")" - * + * | "for" "(" ")" */ iteration_statement iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3; @@ -1255,7 +1248,7 @@ iteration_statement_2 expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon; iteration_statement_3 "for" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and - for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope; + for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement; /* * ::= diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h index e1705dfe193..6a382970e1a 100644 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ b/src/mesa/shader/slang/library/slang_shader_syn.h @@ -566,8 +566,6 @@ " lbrace .and rbrace;\n" "compound_statement_3\n" " lbrace .and statement_list .and rbrace;\n" -"statement_no_new_scope\n" -" compound_statement_no_new_scope .or simple_statement;\n" "compound_statement_no_new_scope\n" " compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n" "compound_statement_no_new_scope_1\n" @@ -617,7 +615,7 @@ " expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n" "iteration_statement_3\n" " \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n" -" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n" +" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement;\n" "for_init_statement\n" " expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n" "conditionopt\n" diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index add8594ff95..ec27fc69dff 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1138,26 +1138,8 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, RETURN0; if (!parse_child_operation(C, &o, oper, GL_FALSE)) RETURN0; -#if 0 if (!parse_child_operation(C, &o, oper, GL_TRUE)) RETURN0; -#else - /* force creation of new scope for loop body */ - { - slang_operation *ch; - slang_output_ctx oo = o; - - /* grow child array */ - ch = slang_operation_grow(&oper->num_children, &oper->children); - ch->type = SLANG_OPER_BLOCK_NEW_SCOPE; - - ch->locals->outer_scope = o.vars; - oo.vars = ch->locals; - - if (!parse_child_operation(C, &oo, ch, GL_TRUE)) - RETURN0; - } -#endif } break; case OP_PRECISION: -- cgit v1.2.3 From a0318d7f8eea286a99c8fd6afb4d71b66d2b341c Mon Sep 17 00:00:00 2001 From: Thomas Henn Date: Mon, 12 Jan 2009 10:56:42 -0700 Subject: windows: updated VC8 project files --- windows/VC8/mesa/mesa/mesa.vcproj | 97 +++++++++++++++++++++++++++++++++++--- windows/VC8/progs/glut/glut.vcproj | 9 +++- 2 files changed, 99 insertions(+), 7 deletions(-) diff --git a/windows/VC8/mesa/mesa/mesa.vcproj b/windows/VC8/mesa/mesa/mesa.vcproj index 9b11098d543..88cc2fc6b85 100644 --- a/windows/VC8/mesa/mesa/mesa.vcproj +++ b/windows/VC8/mesa/mesa/mesa.vcproj @@ -1,9 +1,10 @@ + + @@ -263,6 +268,10 @@ RelativePath="..\..\..\..\src\mesa\main\dlist.c" > + + @@ -295,6 +304,10 @@ RelativePath="..\..\..\..\src\mesa\main\feedback.c" > + + @@ -505,6 +518,10 @@ RelativePath="..\..\..\..\src\mesa\main\polygon.c" > + + @@ -573,6 +590,10 @@ RelativePath="..\..\..\..\src\mesa\main\rbadaptors.c" > + + @@ -693,6 +714,10 @@ RelativePath="..\..\..\..\src\mesa\swrast\s_zoom.c" > + + @@ -861,6 +886,10 @@ RelativePath="..\..\..\..\src\mesa\main\stencil.c" > + + @@ -1082,6 +1111,10 @@ RelativePath="..\..\..\..\src\mesa\main\api_eval.h" > + + @@ -1106,6 +1139,10 @@ RelativePath="..\..\..\..\src\mesa\shader\arbprogram_syn.h" > + + @@ -1114,6 +1151,10 @@ RelativePath="..\..\..\..\src\mesa\main\attrib.h" > + + @@ -1126,6 +1167,10 @@ RelativePath="..\..\..\..\src\mesa\main\buffers.h" > + + @@ -1170,6 +1215,10 @@ RelativePath="..\..\..\..\src\mesa\main\dlist.h" > + + @@ -1198,6 +1247,10 @@ RelativePath="..\..\..\..\src\mesa\main\feedback.h" > + + @@ -1346,6 +1399,18 @@ RelativePath="..\..\..\..\src\mesa\main\matrix.h" > + + + + + + @@ -1354,6 +1419,10 @@ RelativePath="..\..\..\..\src\mesa\main\mtypes.h" > + + @@ -1371,15 +1440,15 @@ > + + @@ -1555,11 +1628,11 @@ > + + @@ -1726,6 +1803,10 @@ RelativePath="..\..\..\..\src\mesa\main\texformat_tmp.h" > + + @@ -1734,6 +1815,10 @@ RelativePath="..\..\..\..\src\mesa\main\texobj.h" > + + diff --git a/windows/VC8/progs/glut/glut.vcproj b/windows/VC8/progs/glut/glut.vcproj index 72b3266b1e1..8d03c378412 100644 --- a/windows/VC8/progs/glut/glut.vcproj +++ b/windows/VC8/progs/glut/glut.vcproj @@ -1,9 +1,10 @@ @@ -324,6 +327,10 @@ RelativePath="..\..\..\..\src\glut\glx\glut_overlay.c" > + + -- cgit v1.2.3 From 7f7fc3e3af6471a224a10bf3d2cd6ddd7a96d334 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Mon, 12 Jan 2009 16:04:32 +0100 Subject: mesa: match against *-gnu* instead of *-gnu in configure.ac Fixes build on arm-linux-gnueabi --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d3a93645e80..6a99f3031e2 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ dnl Compiler macros DEFINES="" AC_SUBST([DEFINES]) case "$host_os" in -*-gnu) +*-gnu*) if test "x$GCC" = xyes; then DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE" fi -- cgit v1.2.3 From 29f603a270da711a2a980cc9896e5883e59227cd Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 12 Jan 2009 11:10:31 -0800 Subject: autoconf: Only _GNU_SOURCE feature test macro needed on gnu systems According to feature_test_macros(7), _GNU_SOURCE encompasses all the other feature macros we were setting, so we can just dispose of them. --- configure.ac | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 6a99f3031e2..33c107266a2 100644 --- a/configure.ac +++ b/configure.ac @@ -84,10 +84,7 @@ DEFINES="" AC_SUBST([DEFINES]) case "$host_os" in *-gnu*) -if test "x$GCC" = xyes; then - DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE" -fi - DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS" + DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS" ;; solaris*) DEFINES="$DEFINES -DPTHREADS -DSVR4" -- cgit v1.2.3 From de35989cdec9807c60b2b4389e5988037ce23d95 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 9 Jan 2009 15:52:04 -0700 Subject: i965: fix broken ARB fp fog options Just call _mesa_append_fog_code() if the fragment program's FogOption is not GL_NONE. This allows us to remove some unnecessary i965 fog code. Note, the arbfplight.c demo can be used to test this (see DO_FRAGMENT_FOG). --- src/mesa/drivers/dri/i965/brw_program.c | 6 ++++ src/mesa/drivers/dri/i965/brw_wm_fp.c | 52 --------------------------------- 2 files changed, 6 insertions(+), 52 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index a18dee85e80..0c86911044b 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -111,9 +111,15 @@ static void brwProgramStringNotify( GLcontext *ctx, struct gl_program *prog ) { if (target == GL_FRAGMENT_PROGRAM_ARB) { + struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog; struct brw_context *brw = brw_context(ctx); struct brw_fragment_program *p = (struct brw_fragment_program *)prog; struct brw_fragment_program *fp = (struct brw_fragment_program *)brw->fragment_program; + if (fprog->FogOption) { + _mesa_append_fog_code(ctx, fprog); + fprog->FogOption = GL_NONE; + } + if (p == fp) brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM; p->id = brw->program_id++; diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index f4583877aa5..1a00b698256 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -811,57 +811,6 @@ static void precalc_txp( struct brw_wm_compile *c, - - -/*********************************************************************** - * Add instructions to perform fog blending - */ - -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_param5( c, STATE_FOG_COLOR, 0,0,0,0 ); - - /* color.xyz = LRP fog_factor.xxxx, output_color, fog_color */ - - emit_op(c, - OPCODE_LRP, - dst_mask(outcolor, WRITEMASK_XYZ), - 0, 0, 0, - fog_factor, - src_reg_from_dst(outcolor), - fogcolor); -} - - - -/* This one is simple - just take the interpolated fog coordinate and - * use it as the fog blend factor. - */ -static void fog_interpolated( struct brw_wm_compile *c ) -{ - struct prog_src_register fogc = src_reg(PROGRAM_INPUT, FRAG_ATTRIB_FOGC); - - if (!(c->fp_interp_emitted & (1<fp->program.FogOption) - return; - - if (1) - fog_interpolated( c ); - else { - /* TODO: per-pixel fog */ - assert(0); - } -} - static void emit_fb_write( struct brw_wm_compile *c ) { struct prog_src_register payload_r0_depth = src_reg(PROGRAM_PAYLOAD, PAYLOAD_DEPTH); @@ -1059,7 +1008,6 @@ void brw_wm_pass_fp( struct brw_wm_compile *c ) emit_ddy(c, inst); break; case OPCODE_END: - emit_fog(c); emit_fb_write(c); break; case OPCODE_PRINT: -- cgit v1.2.3 From 3a5463d158eff483a992c9792d771fb80db9aed0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 12 Jan 2009 15:43:54 -0700 Subject: i965: fix broken glBitmap + depth test When we use the do_blit_bitmap() function, it seems the fragment Z is always 1.0. If depth testing is on, that means that bitmap fragments are often occluded by other rendering. So, the bitmap doesn't appear even if rasterpos.Z==0. The fix is to use the intel_texture_bitmap() path when depth testing is on. Also, fix the incorrect Z coordinate. It needs to be an NDC value in [-1,1]. --- src/mesa/drivers/dri/intel/intel_pixel_bitmap.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c index 1d7f15f10a5..3a01f63dc72 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c @@ -204,6 +204,14 @@ do_blit_bitmap( GLcontext *ctx, /* Update draw buffer bounds */ _mesa_update_state(ctx); + if (ctx->Depth.Test) { + /* The blit path produces incorrect results when depth testing is on. + * It seems the blit Z coord is always 1.0 (the far plane) so fragments + * will likely be obscured by other, closer geometry. + */ + return GL_FALSE; + } + if (!dst) return GL_FALSE; @@ -357,6 +365,7 @@ intel_texture_bitmap(GLcontext * ctx, GLubyte *unpacked_bitmap; GLubyte *a8_bitmap; int x, y; + GLfloat dst_z; /* We need a fragment program for the KIL effect */ if (!ctx->Extensions.ARB_fragment_program || @@ -456,21 +465,24 @@ intel_texture_bitmap(GLcontext * ctx, intel_meta_set_passthrough_vertex_program(intel); intel_meta_set_passthrough_transform(intel); + /* convert rasterpos Z from [0,1] to NDC coord in [-1,1] */ + dst_z = -1.0 + 2.0 * ctx->Current.RasterPos[2]; + vertices[0][0] = dst_x; vertices[0][1] = dst_y; - vertices[0][2] = ctx->Current.RasterPos[2]; + vertices[0][2] = dst_z; vertices[0][3] = 1.0; vertices[1][0] = dst_x + width; vertices[1][1] = dst_y; - vertices[1][2] = ctx->Current.RasterPos[2]; + vertices[1][2] = dst_z; vertices[1][3] = 1.0; vertices[2][0] = dst_x + width; vertices[2][1] = dst_y + height; - vertices[2][2] = ctx->Current.RasterPos[2]; + vertices[2][2] = dst_z; vertices[2][3] = 1.0; vertices[3][0] = dst_x; vertices[3][1] = dst_y + height; - vertices[3][2] = ctx->Current.RasterPos[2]; + vertices[3][2] = dst_z; vertices[3][3] = 1.0; texcoords[0][0] = 0.0; -- cgit v1.2.3 From eeeed45c2cf6c876d79ae20a9a96172ece8642fe Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 12 Jan 2009 15:47:36 -0700 Subject: i965: fix glDrawPixels Z coordinate in intel_texture_drawpixels(). As for glBitmap, it needs to be an NDC coord in [-1,1]. --- src/mesa/drivers/dri/intel/intel_pixel_draw.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c index 2af839b8031..0e83afa6451 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c @@ -71,6 +71,7 @@ intel_texture_drawpixels(GLcontext * ctx, GLuint texname; GLfloat vertices[4][4]; GLfloat texcoords[4][2]; + GLfloat z; /* We're going to mess with texturing with no regard to existing texture * state, so if there is some set up we have to bail. @@ -140,6 +141,9 @@ intel_texture_drawpixels(GLcontext * ctx, intel_meta_set_passthrough_transform(intel); + /* convert rasterpos Z from [0,1] to NDC coord in [-1,1] */ + z = -1.0 + 2.0 * ctx->Current.RasterPos[2]; + /* Create the vertex buffer based on the current raster pos. The x and y * we're handed are ctx->Current.RasterPos[0,1] rounded to integers. * We also apply the depth. However, the W component is already multiplied @@ -147,19 +151,19 @@ intel_texture_drawpixels(GLcontext * ctx, */ vertices[0][0] = x; vertices[0][1] = y; - vertices[0][2] = ctx->Current.RasterPos[2]; + vertices[0][2] = z; vertices[0][3] = 1.0; vertices[1][0] = x + width * ctx->Pixel.ZoomX; vertices[1][1] = y; - vertices[1][2] = ctx->Current.RasterPos[2]; + vertices[1][2] = z; vertices[1][3] = 1.0; vertices[2][0] = x + width * ctx->Pixel.ZoomX; vertices[2][1] = y + height * ctx->Pixel.ZoomY; - vertices[2][2] = ctx->Current.RasterPos[2]; + vertices[2][2] = z; vertices[2][3] = 1.0; vertices[3][0] = x; vertices[3][1] = y + height * ctx->Pixel.ZoomY; - vertices[3][2] = ctx->Current.RasterPos[2]; + vertices[3][2] = z; vertices[3][3] = 1.0; texcoords[0][0] = 0.0; -- cgit v1.2.3 From 00c02626d8087cab0cf5581911c4e68f7b32eb6e Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Tue, 13 Jan 2009 09:01:34 -0700 Subject: windows: try to create a context in wglCreateLayerContext() --- src/mesa/drivers/windows/gdi/wgl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c index 9f0bb9122a9..8d8087067f5 100644 --- a/src/mesa/drivers/windows/gdi/wgl.c +++ b/src/mesa/drivers/windows/gdi/wgl.c @@ -601,8 +601,9 @@ WINGDIAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc, WINGDIAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc, int iLayerPlane) { - (void) hdc; (void) iLayerPlane; SetLastError(0); + if (iLayerPlane == 0) + return wglCreateContext( hdc ); return(NULL); } -- cgit v1.2.3 From 34500a6da565f769e55babc6d28c14f606e2d52a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 09:03:43 -0700 Subject: docs: fixes since 7.3-rc1 --- docs/relnotes-7.3.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html index c4866140115..b6c2463b811 100644 --- a/docs/relnotes-7.3.html +++ b/docs/relnotes-7.3.html @@ -43,6 +43,8 @@ tbd
      • Assorted GLSL bug fixes
      • Assorted i965 driver fixes +
      • Fix for wglCreateLayerContext() in WGL/Windows driver +
      • Build fixes for OpenBSD and gcc 2.95

      Changes

      -- cgit v1.2.3 From 1f47388dfebf15f610993f046e1f945024c8fc3c Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 9 Jan 2009 18:28:38 -0800 Subject: Add language about implicit flush and command completion Copied language from the glXSwapBuffers manual page about the implicit glFlush and expected command completion. This just codifies what people already expect from glXCopySubBufferMESA. The intention of this command is to work like glXSwapBuffers but on a sub-rectangle of the drawable. Acked-by: Brian Paul --- docs/MESA_copy_sub_buffer.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/MESA_copy_sub_buffer.spec b/docs/MESA_copy_sub_buffer.spec index 43424a5f46b..752a014b352 100644 --- a/docs/MESA_copy_sub_buffer.spec +++ b/docs/MESA_copy_sub_buffer.spec @@ -16,7 +16,7 @@ Status Version - Last Modified Date: 8 June 2000 + Last Modified Date: 12 January 2009 Number @@ -69,6 +69,12 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) and indicate the size in pixels. Coordinate (0,0) corresponds to the lower-left pixel of the window, like glReadPixels. + If dpy and drawable are the display and drawable for the calling + thread's current context, glXCopySubBufferMESA performs an + implicit glFlush before it returns. Subsequent OpenGL commands + may be issued immediately after calling glXCopySubBufferMESA, but + are not executed until the copy is completed. + GLX Protocol None at this time. The extension is implemented in terms of ordinary @@ -84,5 +90,7 @@ New State Revision History - 8 June 2000 - initial specification + 12 January 2009 Ian Romanick - Added language about implicit flush + and command completion. + 8 June 2000 Brian Paul - initial specification -- cgit v1.2.3 From 01a0938776ad12e6560a17163bb7a6a3da9e9820 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 15:06:52 -0700 Subject: glsl: add preprocessor support for #pragma Two forms are supported: Pragmas are silently ignored at this time. --- .../shader/slang/library/slang_pp_directives.syn | 20 ++++++++++ .../shader/slang/library/slang_pp_directives_syn.h | 11 ++++++ src/mesa/shader/slang/slang_preprocess.c | 44 +++++++++++++++++++++- 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/library/slang_pp_directives.syn b/src/mesa/shader/slang/library/slang_pp_directives.syn index d4a321034d1..b51d168cc03 100644 --- a/src/mesa/shader/slang/library/slang_pp_directives.syn +++ b/src/mesa/shader/slang/library/slang_pp_directives.syn @@ -79,6 +79,12 @@ .emtcode BEHAVIOR_WARN 3 .emtcode BEHAVIOR_DISABLE 4 +/* + * The PRAGMA_* symbols follow TOKEN_PRAGMA + */ +.emtcode PRAGMA_NO_PARAM 0 +.emtcode PRAGMA_PARAM 1 + source optional_directive .and .loop source_element .and '\0' .emit ESCAPE_TOKEN .emit TOKEN_END; @@ -153,6 +159,7 @@ directive dir_elif .emit TOKEN_ELIF .or dir_endif .emit TOKEN_ENDIF .or dir_ext .emit TOKEN_EXTENSION .or + dir_pragma .emit TOKEN_PRAGMA .or dir_line .emit TOKEN_LINE; dir_define @@ -187,6 +194,19 @@ dir_ext dir_line optional_space .and '#' .and optional_space .and "line" .and expression; +dir_pragma + optional_space .and '#' .and optional_space .and "pragma" .and symbol .and opt_pragma_param; + + +opt_pragma_param + pragma_param .or .true .emit PRAGMA_NO_PARAM; + +pragma_param + optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')'; + +symbol_no_space + symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; + symbol space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; diff --git a/src/mesa/shader/slang/library/slang_pp_directives_syn.h b/src/mesa/shader/slang/library/slang_pp_directives_syn.h index 35e7bc27616..430f8d8217c 100644 --- a/src/mesa/shader/slang/library/slang_pp_directives_syn.h +++ b/src/mesa/shader/slang/library/slang_pp_directives_syn.h @@ -20,6 +20,8 @@ ".emtcode BEHAVIOR_ENABLE 2\n" ".emtcode BEHAVIOR_WARN 3\n" ".emtcode BEHAVIOR_DISABLE 4\n" +".emtcode PRAGMA_NO_PARAM 0\n" +".emtcode PRAGMA_PARAM 1\n" "source\n" " optional_directive .and .loop source_element .and '\\0' .emit ESCAPE_TOKEN .emit TOKEN_END;\n" "source_element\n" @@ -76,6 +78,7 @@ " dir_elif .emit TOKEN_ELIF .or\n" " dir_endif .emit TOKEN_ENDIF .or\n" " dir_ext .emit TOKEN_EXTENSION .or\n" +" dir_pragma .emit TOKEN_PRAGMA .or\n" " dir_line .emit TOKEN_LINE;\n" "dir_define\n" " optional_space .and '#' .and optional_space .and \"define\" .and symbol .and opt_parameters .and\n" @@ -99,6 +102,14 @@ " optional_space .and ':' .and optional_space .and extension_behavior;\n" "dir_line\n" " optional_space .and '#' .and optional_space .and \"line\" .and expression;\n" +"dir_pragma\n" +" optional_space .and '#' .and optional_space .and \"pragma\" .and symbol .and opt_pragma_param;\n" +"opt_pragma_param\n" +" pragma_param .or .true .emit PRAGMA_NO_PARAM;\n" +"pragma_param\n" +" optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')';\n" +"symbol_no_space\n" +" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" "symbol\n" " space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" "opt_parameters\n" diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c index 76e757cb381..244a09171c7 100644 --- a/src/mesa/shader/slang/slang_preprocess.c +++ b/src/mesa/shader/slang/slang_preprocess.c @@ -51,6 +51,9 @@ grammar_error_to_log (slang_info_log *log) GLint pos; grammar_get_last_error ((byte *) (buf), sizeof (buf), &pos); + if (buf[0] == 0) { + _mesa_snprintf(buf, sizeof(buf), "Preprocessor error"); + } slang_info_log_error (log, buf); } @@ -528,6 +531,20 @@ pp_ext_set(pp_ext *self, const char *name, GLboolean enable) } +/** + * Called in response to #pragma. For example, "#pragma debug(on)" would + * call this function as pp_pragma("debug", "on"). + * At this time, pragmas are silently ignored. + */ +static void +pp_pragma(const char *pragma, const char *param) +{ +#if 0 + printf("#pragma %s %s\n", pragma, param); +#endif +} + + /** * The state of preprocessor: current line, file and version number, list * of all defined macros and the #if/#endif context. @@ -862,6 +879,10 @@ parse_if (slang_string *output, const byte *prod, GLuint *pi, GLint *result, pp_ #define BEHAVIOR_WARN 3 #define BEHAVIOR_DISABLE 4 +#define PRAGMA_NO_PARAM 0 +#define PRAGMA_PARAM 1 + + static GLboolean preprocess_source (slang_string *output, const char *source, grammar pid, grammar eid, @@ -940,9 +961,11 @@ preprocess_source (slang_string *output, const char *source, else { const char *id; GLuint idlen; + GLubyte token; i++; - switch (prod[i++]) { + token = prod[i++]; + switch (token) { case TOKEN_END: /* End of source string. @@ -1159,6 +1182,25 @@ preprocess_source (slang_string *output, const char *source, } break; + case TOKEN_PRAGMA: + { + GLint have_param; + const char *pragma, *param; + + pragma = (const char *) (&prod[i]); + i += _mesa_strlen(pragma) + 1; + have_param = (prod[i++] == PRAGMA_PARAM); + if (have_param) { + param = (const char *) (&prod[i]); + i += _mesa_strlen(param) + 1; + } + else { + param = NULL; + } + pp_pragma(pragma, param); + } + break; + case TOKEN_LINE: id = (const char *) (&prod[i]); i += _mesa_strlen (id) + 1; -- cgit v1.2.3 From 34d17d2bdc3da2fe8b669adc166f3ee07ad11391 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 15:09:13 -0700 Subject: docs: #pragma now handled --- docs/relnotes-7.3.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html index b6c2463b811..69f335f2d8b 100644 --- a/docs/relnotes-7.3.html +++ b/docs/relnotes-7.3.html @@ -45,6 +45,7 @@ tbd
    • Assorted i965 driver fixes
    • Fix for wglCreateLayerContext() in WGL/Windows driver
    • Build fixes for OpenBSD and gcc 2.95 +
    • GLSL preprocessor handles #pragma now

    Changes

    -- cgit v1.2.3 From ef0e0f2550b8bc63972ee53a80578b19ff2a5bbc Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 13 Jan 2009 23:54:46 +0000 Subject: glsl: support sampler arrays. --- src/mesa/shader/slang/slang_codegen.c | 33 +++++++++++++++++++++++++++++---- src/mesa/shader/slang/slang_emit.c | 17 ++++++++++++++--- src/mesa/shader/slang/slang_link.c | 10 ++++++---- 3 files changed, 49 insertions(+), 11 deletions(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index f5c5cbdd484..20946650293 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -4261,10 +4261,14 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, slang_ir_storage *store = NULL; int dbg = 0; const GLenum datatype = _slang_gltype_from_specifier(&var->type.specifier); - const GLint texIndex = sampler_to_texture_index(var->type.specifier.type); const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); const GLint arrayLen = _slang_array_length(var); const GLint totalSize = _slang_array_size(size, arrayLen); + GLint texIndex = sampler_to_texture_index(var->type.specifier.type); + + /* check for sampler2D arrays */ + if (texIndex == -1 && var->type.specifier._array) + texIndex = sampler_to_texture_index(var->type.specifier._array->type); if (texIndex != -1) { /* This is a texture sampler variable... @@ -4278,15 +4282,36 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } #if FEATURE_es2_glsl /* XXX should use FEATURE_texture_rect */ /* disallow rect samplers */ - if (var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECT || - var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECTSHADOW) { + if ((var->type.specifier._array && + (var->type.specifier._array->type == SLANG_SPEC_SAMPLER2DRECT || + var->type.specifier._array->type == SLANG_SPEC_SAMPLER2DRECTSHADOW)) || + (var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECT || + var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECTSHADOW)) { slang_info_log_error(A->log, "invalid sampler type for '%s'", varName); return GL_FALSE; } #endif { + const GLuint swizzle = _slang_var_swizzle(totalSize, 0); GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype); - store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex); + store = _slang_new_ir_storage_swz(PROGRAM_SAMPLER, sampNum, + totalSize, swizzle); + + /* If we have a sampler array, then we need to allocate the + * additional samplers to ensure we don't allocate them elsewhere. + * We can't directly use _mesa_add_sampler() as that checks the + * varName and gets a match, so we call _mesa_add_parameter() + * directly and use the last sampler number for the call above. + */ + if (arrayLen > 0) { + GLint a = arrayLen - 1; + GLint i; + for (i = 0; i < a; i++) { + GLfloat value = (GLfloat)(i + sampNum + 1); + (void) _mesa_add_parameter(prog->Parameters, PROGRAM_SAMPLER, + varName, 1, datatype, &value, NULL, 0x0); + } + } } if (dbg) printf("SAMPLER "); } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index d3b4e64b78d..08b7d519a57 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1271,6 +1271,20 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n) opcode = OPCODE_TXP; } + if (n->Children[0]->Opcode == IR_ELEMENT) { + /* array is the sampler (a uniform which'll indicate the texture unit) */ + assert(n->Children[0]->Children[0]->Store); + assert(n->Children[0]->Children[0]->Store->File == PROGRAM_SAMPLER); + + emit(emitInfo, n->Children[0]); + + n->Children[0]->Var = n->Children[0]->Children[0]->Var; + } else { + /* this is the sampler (a uniform which'll indicate the texture unit) */ + assert(n->Children[0]->Store); + assert(n->Children[0]->Store->File == PROGRAM_SAMPLER); + } + /* emit code for the texcoord operand */ (void) emit(emitInfo, n->Children[1]); @@ -1286,9 +1300,6 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n) NULL, NULL); - /* Child[0] is the sampler (a uniform which'll indicate the texture unit) */ - assert(n->Children[0]->Store); - assert(n->Children[0]->Store->File == PROGRAM_SAMPLER); /* Store->Index is the sampler index */ assert(n->Children[0]->Store->Index >= 0); /* Store->Size is the texture target */ diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 26f5d61e048..05a3e2dee07 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -282,12 +282,14 @@ link_uniform_vars(GLcontext *ctx, for (i = 0; i < prog->NumInstructions; i++) { struct prog_instruction *inst = prog->Instructions + i; if (_mesa_is_tex_instruction(inst->Opcode)) { - /* + const GLint oldSampNum = inst->TexSrcUnit; + +#if 0 printf("====== remap sampler from %d to %d\n", - inst->Sampler, map[ inst->Sampler ]); - */ + inst->TexSrcUnit, samplerMap[ inst->TexSrcUnit ]); +#endif + /* here, texUnit is really samplerUnit */ - const GLint oldSampNum = inst->TexSrcUnit; if (oldSampNum < Elements(samplerMap)) { const GLuint newSampNum = samplerMap[oldSampNum]; inst->TexSrcUnit = newSampNum; -- cgit v1.2.3 From 14eca6b573f70485feb6dc6bc048843e1b65e780 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 13 Jan 2009 23:59:18 +0000 Subject: glsl: fix a comment typo --- src/mesa/shader/slang/slang_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 20946650293..a19fc0b1062 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -4301,7 +4301,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, * additional samplers to ensure we don't allocate them elsewhere. * We can't directly use _mesa_add_sampler() as that checks the * varName and gets a match, so we call _mesa_add_parameter() - * directly and use the last sampler number for the call above. + * directly and use the last sampler number from the call above. */ if (arrayLen > 0) { GLint a = arrayLen - 1; -- cgit v1.2.3 From c157a5bb9131dc95f2e5519fda19cf8c3567543a Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Wed, 14 Jan 2009 09:32:55 +0800 Subject: intel: bump driver date --- src/mesa/drivers/dri/intel/intel_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 44b276a123e..7b7f7d8c145 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -95,7 +95,7 @@ int INTEL_DEBUG = (0); #include "extension_helper.h" -#define DRIVER_DATE "20080716" +#define DRIVER_DATE "20090114" #define DRIVER_DATE_GEM "GEM " DRIVER_DATE static const GLubyte * -- cgit v1.2.3 From d687476eddf96ba172d6d63b9cb4a091ce358b1a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 10:09:02 -0700 Subject: i965: fix indentation --- src/mesa/drivers/dri/i965/brw_wm_glsl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index 942ebe1ed4e..22a8cb833fc 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -894,13 +894,13 @@ static void emit_lrp(struct brw_wm_compile *c, static void emit_kil(struct brw_wm_compile *c) { - struct brw_compile *p = &c->func; - struct brw_reg depth = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW); - brw_push_insn_state(p); - brw_set_mask_control(p, BRW_MASK_DISABLE); - brw_NOT(p, c->emit_mask_reg, brw_mask_reg(1)); //IMASK - brw_AND(p, depth, c->emit_mask_reg, depth); - brw_pop_insn_state(p); + struct brw_compile *p = &c->func; + struct brw_reg depth = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW); + brw_push_insn_state(p); + brw_set_mask_control(p, BRW_MASK_DISABLE); + brw_NOT(p, c->emit_mask_reg, brw_mask_reg(1)); //IMASK + brw_AND(p, depth, c->emit_mask_reg, depth); + brw_pop_insn_state(p); } static void emit_mad(struct brw_wm_compile *c, -- cgit v1.2.3 From 8f7349dbb46e1ec6d8194a42753e83c1913944bc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 10:20:15 -0700 Subject: mesa: put _NV suffix on a few opcodes --- src/mesa/shader/prog_instruction.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index f5c0a498fb0..4a6d0d670ac 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -1,8 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 + * Version: 7.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2009 VMware, 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"), @@ -157,7 +158,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_AND, "AND", 2, 1 }, { OPCODE_ARA, "ARA", 1, 1 }, { OPCODE_ARL, "ARL", 1, 1 }, - { OPCODE_ARL_NV, "ARL", 1, 1 }, + { OPCODE_ARL_NV, "ARL_NV", 1, 1 }, { OPCODE_ARR, "ARL", 1, 1 }, { OPCODE_BGNLOOP,"BGNLOOP", 0, 0 }, { OPCODE_BGNSUB, "BGNSUB", 0, 0 }, @@ -186,7 +187,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_FRC, "FRC", 1, 1 }, { OPCODE_IF, "IF", 1, 0 }, { OPCODE_KIL, "KIL", 1, 0 }, - { OPCODE_KIL_NV, "KIL", 0, 0 }, + { OPCODE_KIL_NV, "KIL_NV", 0, 0 }, { OPCODE_LG2, "LG2", 1, 1 }, { OPCODE_LIT, "LIT", 1, 1 }, { OPCODE_LOG, "LOG", 1, 1 }, @@ -235,7 +236,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_TXD, "TXD", 3, 1 }, { OPCODE_TXL, "TXL", 1, 1 }, { OPCODE_TXP, "TXP", 1, 1 }, - { OPCODE_TXP_NV, "TXP", 1, 1 }, + { OPCODE_TXP_NV, "TXP_NV", 1, 1 }, { OPCODE_TRUNC, "TRUNC", 1, 1 }, { OPCODE_UP2H, "UP2H", 1, 1 }, { OPCODE_UP2US, "UP2US", 1, 1 }, -- cgit v1.2.3 From 658ab3c3ae4c99e841a6639f6d012c23deeb5371 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 10:26:25 -0700 Subject: i965: comment for emit_kil() --- src/mesa/drivers/dri/i965/brw_wm_glsl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index 22a8cb833fc..8fd776ac393 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -892,6 +892,10 @@ static void emit_lrp(struct brw_wm_compile *c, } } +/** + * For GLSL shaders, this KIL will be unconditional. + * It may be contained inside an IF/ENDIF structure of course. + */ static void emit_kil(struct brw_wm_compile *c) { struct brw_compile *p = &c->func; -- cgit v1.2.3 From d911e3e24fbfb5cd28cabb92f952775b7eb1d1d9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 10:38:15 -0700 Subject: i965: fix indentation --- src/mesa/drivers/dri/i965/brw_sf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index 9dce6cd8e6c..1a11d546210 100644 --- a/src/mesa/drivers/dri/i965/brw_sf.c +++ b/src/mesa/drivers/dri/i965/brw_sf.c @@ -73,10 +73,12 @@ static void compile_sf_prog( struct brw_context *brw, c.attr_to_idx[i] = idx; c.idx_to_attr[idx] = i; if (i >= VERT_RESULT_TEX0 && i <= VERT_RESULT_TEX7) { - c.point_attrs[i].CoordReplace = - brw->attribs.Point->CoordReplace[i - VERT_RESULT_TEX0]; - } else - c.point_attrs[i].CoordReplace = GL_FALSE; + c.point_attrs[i].CoordReplace = + brw->attribs.Point->CoordReplace[i - VERT_RESULT_TEX0]; + } + else { + c.point_attrs[i].CoordReplace = GL_FALSE; + } idx++; } @@ -106,7 +108,6 @@ static void compile_sf_prog( struct brw_context *brw, assert(0); return; } - /* get the program */ -- cgit v1.2.3 From 49b53407c7c4f08b5e13591fd04080ca602fba40 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 13 Jan 2009 10:40:19 -0700 Subject: i965: allow larger AA points on fallback path --- src/mesa/drivers/dri/i965/brw_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index a415e378fff..d7a2bd95ee2 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -143,6 +143,9 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis, ctx->Const.MaxCubeTextureLevels = 12; ctx->Const.MaxTextureRectSize = (1<<11); + /* if conformance mode is set, swrast can handle any size AA point */ + ctx->Const.MaxPointSizeAA = 255.0; + /* ctx->Const.MaxNativeVertexProgramTemps = 32; */ brw_init_attribs( brw ); -- cgit v1.2.3 From 1b3e3e6b841535b78ff4fa1d3861e9d8cdeff972 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 08:33:45 -0700 Subject: i965: indentation fixes --- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 +- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c index f12ef47a7d7..8c9cb789453 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -244,7 +244,7 @@ brw_wm_sampler_populate_key(struct brw_context *brw, entry->minfilter = texObj->MinFilter; entry->magfilter = texObj->MagFilter; entry->comparemode = texObj->CompareMode; - entry->comparefunc = texObj->CompareFunc; + entry->comparefunc = texObj->CompareFunc; dri_bo_unreference(brw->wm.sdc_bo[unit]); if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) { diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 63e14cc3900..06e71e6d694 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -192,21 +192,27 @@ brw_create_texture_surface( struct brw_context *brw, if (key->bo) surf.ss0.surface_format = translate_tex_format(key->format, key->depthmode); else { - switch(key->depth) { - case 32: surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; break; - default: - case 24: surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8X8_UNORM; break; - case 16: surf.ss0.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM; break; - } + switch (key->depth) { + case 32: + surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + break; + default: + case 24: + surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8X8_UNORM; + break; + case 16: + surf.ss0.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM; + break; + } } /* This is ok for all textures with channel width 8bit or less: */ /* surf.ss0.data_return_format = BRW_SURFACERETURNFORMAT_S1; */ if (key->bo) - surf.ss1.base_addr = key->bo->offset; /* reloc */ + surf.ss1.base_addr = key->bo->offset; /* reloc */ else - surf.ss1.base_addr = key->offset; + surf.ss1.base_addr = key->offset; surf.ss2.mip_count = key->last_level - key->first_level; surf.ss2.width = key->width - 1; -- cgit v1.2.3 From a98dccca36027fc0ed333075ab30176144e6c475 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 14 Jan 2009 16:32:44 +0000 Subject: glsl: fix regression from sampler arrays commit --- src/mesa/shader/slang/slang_codegen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a19fc0b1062..b046cc2402a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -4292,10 +4292,8 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } #endif { - const GLuint swizzle = _slang_var_swizzle(totalSize, 0); GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype); - store = _slang_new_ir_storage_swz(PROGRAM_SAMPLER, sampNum, - totalSize, swizzle); + store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex); /* If we have a sampler array, then we need to allocate the * additional samplers to ensure we don't allocate them elsewhere. -- cgit v1.2.3 From 2549c26a8b1eec21bdd8f45d3b3dd06e17ac82ae Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 14 Jan 2009 10:05:40 -0800 Subject: Treat image units and coordinate units differently. Previously MaxTextureUnits was used to validate both texture image units and texture coordinate units in fragment programs. Instead, use MaxTextureCoordUnits for texture coordinate units and MaxTextureImageUnits for texture image units. Fixes bugzilla #19468. Signed-off-by: Ian Romanick Reviewed-by: Brian Paul --- src/mesa/shader/arbprogparse.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 39988b5fca6..a3a75c3b0a6 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -963,6 +963,8 @@ parse_output_color_num (GLcontext * ctx, const GLubyte ** inst, /** + * Validate the index of a texture coordinate + * * \param coord The texture unit index * \return 0 on sucess, 1 on error */ @@ -972,8 +974,30 @@ parse_texcoord_num (GLcontext * ctx, const GLubyte ** inst, { GLint i = parse_integer (inst, Program); - if ((i < 0) || (i >= (int)ctx->Const.MaxTextureUnits)) { - program_error(ctx, Program->Position, "Invalid texture unit index"); + if ((i < 0) || (i >= (int)ctx->Const.MaxTextureCoordUnits)) { + program_error(ctx, Program->Position, "Invalid texture coordinate index"); + return 1; + } + + *coord = (GLuint) i; + return 0; +} + + +/** + * Validate the index of a texture image unit + * + * \param coord The texture unit index + * \return 0 on sucess, 1 on error + */ +static GLuint +parse_teximage_num (GLcontext * ctx, const GLubyte ** inst, + struct arb_program *Program, GLuint * coord) +{ + GLint i = parse_integer (inst, Program); + + if ((i < 0) || (i >= (int)ctx->Const.MaxTextureImageUnits)) { + program_error(ctx, Program->Position, "Invalid texture image index"); return 1; } @@ -981,6 +1005,7 @@ parse_texcoord_num (GLcontext * ctx, const GLubyte ** inst, return 0; } + /** * \param coord The weight index * \return 0 on sucess, 1 on error @@ -3003,7 +3028,7 @@ parse_fp_instruction (GLcontext * ctx, const GLubyte ** inst, return 1; /* texImageUnit */ - if (parse_texcoord_num (ctx, inst, Program, &texcoord)) + if (parse_teximage_num (ctx, inst, Program, &texcoord)) return 1; fp->TexSrcUnit = texcoord; -- cgit v1.2.3 From c12d24b513a67648c30bf892964f887fad71e103 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 11:50:32 -0700 Subject: mesa: fix incorrect transformation of GL_SPOT_DIRECTION This was changed between GL 1.0 and 1.1. Mesa still had the 1.0 behaviour. --- docs/relnotes-7.3.html | 1 + src/mesa/main/light.c | 3 ++- src/mesa/math/m_matrix.h | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html index 69f335f2d8b..d46a5098842 100644 --- a/docs/relnotes-7.3.html +++ b/docs/relnotes-7.3.html @@ -46,6 +46,7 @@ tbd
  • Fix for wglCreateLayerContext() in WGL/Windows driver
  • Build fixes for OpenBSD and gcc 2.95
  • GLSL preprocessor handles #pragma now +
  • Fix incorrect transformation of GL_SPOT_DIRECTION

Changes

diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 10ee088a2da..ce50224d30a 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -208,7 +208,8 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) { _math_matrix_analyse(ctx->ModelviewMatrixStack.Top); } - TRANSFORM_NORMAL(temp, params, ctx->ModelviewMatrixStack.Top->inv); + TRANSFORM_DIRECTION(temp, params, ctx->ModelviewMatrixStack.Top->m); + NORMALIZE_3FV(temp); params = temp; break; case GL_SPOT_EXPONENT: diff --git a/src/mesa/math/m_matrix.h b/src/mesa/math/m_matrix.h index e8303f3ac5c..a8d9000e89b 100644 --- a/src/mesa/math/m_matrix.h +++ b/src/mesa/math/m_matrix.h @@ -189,6 +189,18 @@ do { \ } while (0) +/** + * Transform a direction by a matrix. + */ +#define TRANSFORM_DIRECTION( TO, DIR, MAT ) \ +do { \ + TO[0] = DIR[0] * MAT[0] + DIR[1] * MAT[4] + DIR[2] * MAT[8]; \ + TO[1] = DIR[0] * MAT[1] + DIR[1] * MAT[5] + DIR[2] * MAT[9]; \ + TO[2] = DIR[0] * MAT[2] + DIR[1] * MAT[6] + DIR[2] * MAT[10];\ +} while (0) + + + /*@}*/ -- cgit v1.2.3 From b5f89e5f17bdf718d1f1f29e7a10dee3809c9f29 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 11:58:45 -0700 Subject: glsl: simplify IR storage for samplers Don't overload the Size field with the texture target, to avoid confusion. --- src/mesa/shader/slang/slang_codegen.c | 2 +- src/mesa/shader/slang/slang_emit.c | 10 +++------- src/mesa/shader/slang/slang_ir.c | 22 +++++++++++++++++++++- src/mesa/shader/slang/slang_ir.h | 13 +++++++++---- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index b046cc2402a..211260449a0 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -4293,7 +4293,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, #endif { GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype); - store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex); + store = _slang_new_ir_storage_sampler(sampNum, texIndex, totalSize); /* If we have a sampler array, then we need to allocate the * additional samplers to ensure we don't allocate them elsewhere. diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 08b7d519a57..414d3e639bf 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1300,14 +1300,10 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n) NULL, NULL); - /* Store->Index is the sampler index */ + /* Store->Index is the uniform/sampler index */ assert(n->Children[0]->Store->Index >= 0); - /* Store->Size is the texture target */ - assert(n->Children[0]->Store->Size >= TEXTURE_1D_INDEX); - assert(n->Children[0]->Store->Size <= TEXTURE_RECT_INDEX); - - inst->TexSrcTarget = n->Children[0]->Store->Size; - inst->TexSrcUnit = n->Children[0]->Store->Index; /* i.e. uniform's index */ + inst->TexSrcUnit = n->Children[0]->Store->Index; + inst->TexSrcTarget = n->Children[0]->Store->TexTarget; /* mark the sampler as being used */ _mesa_use_uniform(emitInfo->prog->Parameters, diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index c33c80da999..e4c6e0ea516 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 7.1 * * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, 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"), @@ -216,6 +216,26 @@ _slang_new_ir_storage_indirect(enum register_file file, } +/** + * Allocate IR storage for a texture sampler. + * \param sampNum the sampler number/index + * \param texTarget one of TEXTURE_x_INDEX values + * \param size number of samplers (in case of sampler array) + */ +slang_ir_storage * +_slang_new_ir_storage_sampler(GLint sampNum, GLuint texTarget, GLint size) +{ + slang_ir_storage *st; + assert(texTarget < NUM_TEXTURE_TARGETS); + st = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, size); + if (st) { + st->TexTarget = texTarget; + } + return st; +} + + + /* XXX temporary function */ void _slang_copy_ir_storage(slang_ir_storage *dst, const slang_ir_storage *src) diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index a258e92e06f..644269d491c 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 * - * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, 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"), @@ -168,8 +168,8 @@ typedef enum struct slang_ir_storage_ { enum register_file File; /**< PROGRAM_TEMPORARY, PROGRAM_INPUT, etc */ - GLint Index; /**< -1 means unallocated */ - GLint Size; /**< number of floats */ + GLint Index; /**< -1 means unallocated */ + GLint Size; /**< number of floats or ints */ GLuint Swizzle; /**< Swizzle AND writemask info */ GLint RefCount; /**< Used during IR tree delete */ @@ -179,6 +179,7 @@ struct slang_ir_storage_ enum register_file IndirectFile; GLint IndirectIndex; GLuint IndirectSwizzle; + GLuint TexTarget; /**< If File==PROGRAM_SAMPLER, one of TEXTURE_x_INDEX */ /** If Parent is non-null, Index is relative to parent. * The other fields are ignored. @@ -254,6 +255,10 @@ _slang_new_ir_storage_indirect(enum register_file file, GLint indirectIndex, GLuint indirectSwizzle); +extern slang_ir_storage * +_slang_new_ir_storage_sampler(GLint sampNum, GLuint texTarget, GLint size); + + extern void _slang_copy_ir_storage(slang_ir_storage *dst, const slang_ir_storage *src); -- cgit v1.2.3 From aac4a0509e6a5d8e3c8f8179519bcd21364ae18e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 12:07:25 -0700 Subject: windows: remove reference to swizzle.c file --- windows/VC8/mesa/mesa/mesa.vcproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/windows/VC8/mesa/mesa/mesa.vcproj b/windows/VC8/mesa/mesa/mesa.vcproj index 88cc2fc6b85..13029af1437 100644 --- a/windows/VC8/mesa/mesa/mesa.vcproj +++ b/windows/VC8/mesa/mesa/mesa.vcproj @@ -886,10 +886,6 @@ RelativePath="..\..\..\..\src\mesa\main\stencil.c" > - - -- cgit v1.2.3 From fae9604727c048834a7d5a90f8a652c86cff057a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 12:16:00 -0700 Subject: glsl: propagate pragma info down into compiler from preprocessor --- src/mesa/main/mtypes.h | 13 ++++++-- src/mesa/shader/slang/slang_codegen.c | 4 +-- src/mesa/shader/slang/slang_codegen.h | 1 + src/mesa/shader/slang/slang_compile.c | 16 +++++++--- src/mesa/shader/slang/slang_emit.c | 16 ++++++++-- src/mesa/shader/slang/slang_emit.h | 4 ++- src/mesa/shader/slang/slang_preprocess.c | 53 +++++++++++++++++++++++++++----- src/mesa/shader/slang/slang_preprocess.h | 7 +++-- 8 files changed, 90 insertions(+), 24 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 3eca8a85f95..2014745a7a8 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2094,6 +2094,13 @@ struct gl_query_state }; +/** Set by #pragma directives */ +struct gl_sl_pragmas +{ + GLboolean Optimize; /**< defaults on */ + GLboolean Debug; /**< defaults off */ +}; + /** * A GLSL vertex or fragment shader object. @@ -2104,12 +2111,12 @@ struct gl_shader GLuint Name; /**< AKA the handle */ GLint RefCount; /**< Reference count */ GLboolean DeletePending; - - const GLchar *Source; /**< Source code string */ GLboolean CompileStatus; + GLboolean Main; /**< shader defines main() */ + const GLchar *Source; /**< Source code string */ struct gl_program *Program; /**< Post-compile assembly code */ GLchar *InfoLog; - GLboolean Main; /**< shader defines main() */ + struct gl_sl_pragmas Pragmas; }; diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 211260449a0..51eb4c9c112 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -4493,7 +4493,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, n = _slang_gen_var_decl(A, var, var->initializer); /* emit GPU instructions */ - success = _slang_emit_code(n, A->vartable, A->program, GL_FALSE, A->log); + success = _slang_emit_code(n, A->vartable, A->program, A->pragmas, GL_FALSE, A->log); _slang_free_ir_tree(n); } @@ -4603,7 +4603,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, A->log); + success = _slang_emit_code(n, A->vartable, A->program, A->pragmas, GL_TRUE, A->log); _slang_free_ir_tree(n); /* free codegen context */ diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h index 9489033d7b8..f2daa034e4f 100644 --- a/src/mesa/shader/slang/slang_codegen.h +++ b/src/mesa/shader/slang/slang_codegen.h @@ -36,6 +36,7 @@ typedef struct slang_assemble_ctx_ slang_atom_pool *atoms; slang_name_space space; struct gl_program *program; + struct gl_sl_pragmas *pragmas; slang_var_table *vartable; slang_info_log *log; struct slang_label_ *curFuncEndLabel; diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index ec27fc69dff..04fa2e0f931 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -144,6 +144,7 @@ typedef struct slang_output_ctx_ slang_function_scope *funs; slang_struct_scope *structs; struct gl_program *program; + struct gl_sl_pragmas *pragmas; slang_var_table *vartable; GLuint default_precision[TYPE_SPECIFIER_COUNT]; GLboolean allow_precision; @@ -2059,6 +2060,7 @@ 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; + A.pragmas = O->pragmas; A.vartable = O->vartable; A.log = C->L; A.curFuncEndLabel = NULL; @@ -2349,6 +2351,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, o.structs = &unit->structs; o.vars = &unit->vars; o.program = shader ? shader->Program : NULL; + o.pragmas = shader ? &shader->Pragmas : NULL; o.vartable = _slang_new_var_table(maxRegs); _slang_push_var_table(o.vartable); @@ -2417,6 +2420,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, A.space.structs = o.structs; A.space.vars = o.vars; A.program = o.program; + A.pragmas = &shader->Pragmas; A.vartable = o.vartable; A.log = C->L; @@ -2475,7 +2479,8 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, slang_unit_type type, slang_info_log * infolog, slang_code_unit * builtin, struct gl_shader *shader, - const struct gl_extensions *extensions) + const struct gl_extensions *extensions, + struct gl_sl_pragmas *pragmas) { byte *prod; GLuint size, start, version; @@ -2504,7 +2509,7 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, /* Now preprocess the source string. */ slang_string_init(&preprocessed); if (!_slang_preprocess_directives(&preprocessed, &source[start], - infolog, extensions)) { + infolog, extensions, pragmas)) { slang_string_free(&preprocessed); slang_info_log_error(infolog, "failed to preprocess the source."); return GL_FALSE; @@ -2578,7 +2583,8 @@ static GLboolean compile_object(grammar * id, const char *source, slang_code_object * object, slang_unit_type type, slang_info_log * infolog, struct gl_shader *shader, - const struct gl_extensions *extensions) + const struct gl_extensions *extensions, + struct gl_sl_pragmas *pragmas) { slang_code_unit *builtins = NULL; GLuint base_version = 110; @@ -2677,7 +2683,7 @@ compile_object(grammar * id, const char *source, slang_code_object * object, /* compile the actual shader - pass-in built-in library for external shader */ return compile_with_grammar(*id, source, &object->unit, type, infolog, - builtins, shader, extensions); + builtins, shader, extensions, pragmas); } @@ -2701,7 +2707,7 @@ compile_shader(GLcontext *ctx, slang_code_object * object, _slang_code_object_ctr(object); success = compile_object(&id, shader->Source, object, type, infolog, shader, - &ctx->Extensions); + &ctx->Extensions, &shader->Pragmas); if (id != 0) grammar_destroy(id); if (!success) diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 414d3e639bf..6b744d72c82 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2377,10 +2377,20 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo) - +/** + * Convert the IR tree into GPU instructions. + * \param n root of IR tree + * \param vt variable table + * \param prog program to put GPU instructions into + * \param pragmas controls codegen options + * \param withEnd if true, emit END opcode at end + * \param log log for emitting errors/warnings/info + */ GLboolean _slang_emit_code(slang_ir_node *n, slang_var_table *vt, - struct gl_program *prog, GLboolean withEnd, + struct gl_program *prog, + const struct gl_sl_pragmas *pragmas, + GLboolean withEnd, slang_info_log *log) { GET_CURRENT_CONTEXT(ctx); @@ -2397,7 +2407,7 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions; emitInfo.EmitCondCodes = ctx->Shader.EmitCondCodes; - emitInfo.EmitComments = ctx->Shader.EmitComments; + emitInfo.EmitComments = ctx->Shader.EmitComments || pragmas->Debug; emitInfo.EmitBeginEndSub = GL_TRUE; if (!emitInfo.EmitCondCodes) { diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 59fb2fa890d..8ff52bf605d 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -46,7 +46,9 @@ _slang_var_swizzle(GLint size, GLint comp); extern GLboolean _slang_emit_code(slang_ir_node *n, slang_var_table *vartable, - struct gl_program *prog, GLboolean withEnd, + struct gl_program *prog, + const struct gl_sl_pragmas *pragmas, + GLboolean withEnd, slang_info_log *log); diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c index 244a09171c7..cd79c8b94a6 100644 --- a/src/mesa/shader/slang/slang_preprocess.c +++ b/src/mesa/shader/slang/slang_preprocess.c @@ -531,17 +531,53 @@ pp_ext_set(pp_ext *self, const char *name, GLboolean enable) } +static void +pp_pragmas_init(struct gl_sl_pragmas *pragmas) +{ + pragmas->Optimize = GL_TRUE; + pragmas->Debug = GL_FALSE; +} + + /** * Called in response to #pragma. For example, "#pragma debug(on)" would * call this function as pp_pragma("debug", "on"). - * At this time, pragmas are silently ignored. + * \return GL_TRUE if pragma is valid, GL_FALSE if invalid */ -static void -pp_pragma(const char *pragma, const char *param) +static GLboolean +pp_pragma(struct gl_sl_pragmas *pragmas, const char *pragma, const char *param) { #if 0 printf("#pragma %s %s\n", pragma, param); #endif + if (_mesa_strcmp(pragma, "optimize") == 0) { + if (!param) + return GL_FALSE; /* missing required param */ + if (_mesa_strcmp(param, "on") == 0) { + pragmas->Optimize = GL_TRUE; + } + else if (_mesa_strcmp(param, "off") == 0) { + pragmas->Optimize = GL_FALSE; + } + else { + return GL_FALSE; /* invalid param */ + } + } + else if (_mesa_strcmp(pragma, "debug") == 0) { + if (!param) + return GL_FALSE; /* missing required param */ + if (_mesa_strcmp(param, "on") == 0) { + pragmas->Debug = GL_TRUE; + } + else if (_mesa_strcmp(param, "off") == 0) { + pragmas->Debug = GL_FALSE; + } + else { + return GL_FALSE; /* invalid param */ + } + } + /* all other pragmas are silently ignored */ + return GL_TRUE; } @@ -887,7 +923,8 @@ static GLboolean preprocess_source (slang_string *output, const char *source, grammar pid, grammar eid, slang_info_log *elog, - const struct gl_extensions *extensions) + const struct gl_extensions *extensions, + struct gl_sl_pragmas *pragmas) { static const char *predefined[] = { "__FILE__", @@ -909,6 +946,7 @@ preprocess_source (slang_string *output, const char *source, } pp_state_init (&state, elog, extensions); + pp_pragmas_init (pragmas); /* add the predefined symbols to the symbol table */ for (i = 0; predefined[i]; i++) { @@ -1197,7 +1235,7 @@ preprocess_source (slang_string *output, const char *source, else { param = NULL; } - pp_pragma(pragma, param); + pp_pragma(pragmas, pragma, param); } break; @@ -1265,7 +1303,8 @@ GLboolean _slang_preprocess_directives(slang_string *output, const char *input, slang_info_log *elog, - const struct gl_extensions *extensions) + const struct gl_extensions *extensions, + struct gl_sl_pragmas *pragmas) { grammar pid, eid; GLboolean success; @@ -1281,7 +1320,7 @@ _slang_preprocess_directives(slang_string *output, grammar_destroy (pid); return GL_FALSE; } - success = preprocess_source (output, input, pid, eid, elog, extensions); + success = preprocess_source (output, input, pid, eid, elog, extensions, pragmas); grammar_destroy (eid); grammar_destroy (pid); return success; diff --git a/src/mesa/shader/slang/slang_preprocess.h b/src/mesa/shader/slang/slang_preprocess.h index dd996a6314b..f344820daef 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.5.3 * - * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, 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"), @@ -35,6 +35,7 @@ _slang_preprocess_version (const char *, GLuint *, GLuint *, slang_info_log *); extern GLboolean _slang_preprocess_directives(slang_string *output, const char *input, slang_info_log *, - const struct gl_extensions *extensions); + const struct gl_extensions *extensions, + struct gl_sl_pragmas *pragmas); #endif /* SLANG_PREPROCESS_H */ -- cgit v1.2.3 From 03188b09e071ace9d9e21ccc56c01e90c0fa8639 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 14 Jan 2009 12:46:06 -0800 Subject: intel: SW fallback maps texture images, not texture coordinates --- src/mesa/drivers/dri/intel/intel_span.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index 8f4e681ffea..d9315043e6e 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -633,7 +633,7 @@ intelSpanRenderStart(GLcontext * ctx) intelFlush(&intel->ctx); LOCK_HARDWARE(intel); - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { if (ctx->Texture.Unit[i]._ReallyEnabled) { struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current; intel_tex_map_images(intel, intel_texture_object(texObj)); @@ -655,7 +655,7 @@ intelSpanRenderFinish(GLcontext * ctx) _swrast_flush(ctx); - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { if (ctx->Texture.Unit[i]._ReallyEnabled) { struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current; intel_tex_unmap_images(intel, intel_texture_object(texObj)); -- cgit v1.2.3