diff options
author | marha <marha@users.sourceforge.net> | 2013-01-28 07:58:44 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-01-28 07:58:44 +0100 |
commit | 39b49babc915183f4d712053b46f0e010427c191 (patch) | |
tree | b512cf3f17a0defe9e2cd6ababdc9f5337f93d0e /mesalib/src/mesa/program/ir_to_mesa.cpp | |
parent | 3e3af07f7697e9d23dd62fcf8f3a055602ae3341 (diff) | |
parent | 69c8cec54b01ed522bf10baf20da70304bac701a (diff) | |
download | vcxsrv-39b49babc915183f4d712053b46f0e010427c191.tar.gz vcxsrv-39b49babc915183f4d712053b46f0e010427c191.tar.bz2 vcxsrv-39b49babc915183f4d712053b46f0e010427c191.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
mesa mkfontscale pixman git update 28 jan 2013
Diffstat (limited to 'mesalib/src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | mesalib/src/mesa/program/ir_to_mesa.cpp | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index 0f7439b3b..cd89171da 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -623,10 +623,14 @@ type_size(const struct glsl_type *type) * at link time. */ return 1; - default: - assert(0); - return 0; + case GLSL_TYPE_VOID: + case GLSL_TYPE_ERROR: + case GLSL_TYPE_INTERFACE: + assert(!"Invalid type in type_size"); + break; } + + return 0; } /** @@ -1427,7 +1431,21 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_unop_fract: emit(ir, OPCODE_FRC, result_dst, op[0]); break; - + case ir_unop_pack_snorm_2x16: + case ir_unop_pack_snorm_4x8: + case ir_unop_pack_unorm_2x16: + case ir_unop_pack_unorm_4x8: + case ir_unop_pack_half_2x16: + case ir_unop_unpack_snorm_2x16: + case ir_unop_unpack_snorm_4x8: + case ir_unop_unpack_unorm_2x16: + case ir_unop_unpack_unorm_4x8: + case ir_unop_unpack_half_2x16: + case ir_unop_unpack_half_2x16_split_x: + case ir_unop_unpack_half_2x16_split_y: + case ir_binop_pack_half_2x16_split: + assert(!"not supported"); + break; case ir_binop_min: emit(ir, OPCODE_MIN, result_dst, op[0], op[1]); break; @@ -1529,21 +1547,18 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir) var->location); this->variables.push_tail(entry); break; - case ir_var_in: - case ir_var_inout: + case ir_var_shader_in: /* The linker assigns locations for varyings and attributes, * including deprecated builtins (like gl_Color), * user-assigned generic attributes (glBindVertexLocation), * and user-defined varyings. - * - * FINISHME: We would hit this path for function arguments. Fix! */ assert(var->location != -1); entry = new(mem_ctx) variable_storage(var, PROGRAM_INPUT, var->location); break; - case ir_var_out: + case ir_var_shader_out: assert(var->location != -1); entry = new(mem_ctx) variable_storage(var, PROGRAM_OUTPUT, @@ -2378,7 +2393,8 @@ public: } private: - virtual void visit_field(const glsl_type *type, const char *name); + virtual void visit_field(const glsl_type *type, const char *name, + bool row_major); struct gl_shader_program *shader_program; struct gl_program_parameter_list *params; @@ -2386,10 +2402,13 @@ private: }; void -add_uniform_to_shader::visit_field(const glsl_type *type, const char *name) +add_uniform_to_shader::visit_field(const glsl_type *type, const char *name, + bool row_major) { unsigned int size; + (void) row_major; + if (type->is_vector() || type->is_scalar()) { size = type->vector_elements; } else { @@ -2459,7 +2478,7 @@ _mesa_generate_parameters_list_for_uniforms(struct gl_shader_program ir_variable *var = ((ir_instruction *) node)->as_variable(); if ((var == NULL) || (var->mode != ir_var_uniform) - || var->uniform_block != -1 || (strncmp(var->name, "gl_", 3) == 0)) + || var->is_in_uniform_block() || (strncmp(var->name, "gl_", 3) == 0)) continue; add.process(var); @@ -2522,7 +2541,11 @@ _mesa_associate_uniform_storage(struct gl_context *ctx, format = uniform_native; columns = 1; break; - default: + case GLSL_TYPE_ARRAY: + case GLSL_TYPE_VOID: + case GLSL_TYPE_STRUCT: + case GLSL_TYPE_ERROR: + case GLSL_TYPE_INTERFACE: assert(!"Should not get here."); break; } |