Module: Mesa Branch: master Commit: 240974e93f2df10f64aae17e1ed257379bdac5f7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=240974e93f2df10f64aae17e1ed257379bdac5f7
Author: Chris Forbes <[email protected]> Date: Sun May 4 20:23:55 2014 +1200 glsl: Add support for int -> uint implicit conversions This is required for ARB_gpu_shader5. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> --- src/glsl/ast_to_hir.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 659e8cb..d1c77f1 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -176,6 +176,14 @@ get_conversion_operation(const glsl_type *to, const glsl_type *from, default: return (ir_expression_operation)0; } + case GLSL_TYPE_UINT: + if (!state->is_version(400, 0) && !state->ARB_gpu_shader5_enable) + return (ir_expression_operation)0; + switch (from->base_type) { + case GLSL_TYPE_INT: return ir_unop_i2u; + default: return (ir_expression_operation)0; + } + default: return (ir_expression_operation)0; } } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
