[Mesa-dev] [PATCH 2/2] st/mesa: add GSL_TYPE_DOUBLE, new ir_unop_* switch cases
To silence compiler warnings about unhandled switch cases. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 3dac004..9969fac 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -974,6 +974,7 @@ type_size(const struct glsl_type *type) case GLSL_TYPE_UINT: case GLSL_TYPE_INT: case GLSL_TYPE_FLOAT: + case GLSL_TYPE_DOUBLE: case GLSL_TYPE_BOOL: if (type->is_matrix()) { return type->matrix_columns; @@ -2025,6 +2026,17 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) case ir_binop_ldexp: case ir_binop_carry: case ir_binop_borrow: + case ir_unop_d2f: + case ir_unop_f2d: + case ir_unop_d2i: + case ir_unop_i2d: + case ir_unop_d2u: + case ir_unop_u2d: + case ir_unop_d2b: + case ir_unop_pack_double_2x32: + case ir_unop_unpack_double_2x32: + case ir_unop_frexp_sig: + case ir_unop_frexp_exp: /* This operation is not supported, or should have already been handled. */ assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"); -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] st/mesa: add GSL_TYPE_DOUBLE, new ir_unop_* switch cases
To silence compiler warnings about unhandled switch cases. v2: move GSL_TYPE_DOUBLE case to the "Invalid type in type_size" section, per Ilia. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 3dac004..035152a 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1004,6 +1004,7 @@ type_size(const struct glsl_type *type) case GLSL_TYPE_INTERFACE: case GLSL_TYPE_VOID: case GLSL_TYPE_ERROR: + case GLSL_TYPE_DOUBLE: assert(!"Invalid type in type_size"); break; } @@ -2025,6 +2026,17 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) case ir_binop_ldexp: case ir_binop_carry: case ir_binop_borrow: + case ir_unop_d2f: + case ir_unop_f2d: + case ir_unop_d2i: + case ir_unop_i2d: + case ir_unop_d2u: + case ir_unop_u2d: + case ir_unop_d2b: + case ir_unop_pack_double_2x32: + case ir_unop_unpack_double_2x32: + case ir_unop_frexp_sig: + case ir_unop_frexp_exp: /* This operation is not supported, or should have already been handled. */ assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"); -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] st/mesa: add GSL_TYPE_DOUBLE, new ir_unop_* switch cases
On Thu, Feb 19, 2015 at 8:27 AM, Brian Paul wrote: > > To silence compiler warnings about unhandled switch cases. > --- > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > index 3dac004..9969fac 100644 > --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > @@ -974,6 +974,7 @@ type_size(const struct glsl_type *type) > case GLSL_TYPE_UINT: > case GLSL_TYPE_INT: > case GLSL_TYPE_FLOAT: > + case GLSL_TYPE_DOUBLE: > case GLSL_TYPE_BOOL: >if (type->is_matrix()) { > return type->matrix_columns; > @@ -2025,6 +2026,17 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) > case ir_binop_ldexp: > case ir_binop_carry: > case ir_binop_borrow: > + case ir_unop_d2f: > + case ir_unop_f2d: > + case ir_unop_d2i: > + case ir_unop_i2d: > + case ir_unop_d2u: > + case ir_unop_u2d: > + case ir_unop_d2b: > + case ir_unop_pack_double_2x32: > + case ir_unop_unpack_double_2x32: > + case ir_unop_frexp_sig: > + case ir_unop_frexp_exp: >/* This operation is not supported, or should have already been > handled. > */ >assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"); > -- > 1.9.1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Both patches are: Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] st/mesa: add GSL_TYPE_DOUBLE, new ir_unop_* switch cases
On Thu, Feb 19, 2015 at 11:27 AM, Brian Paul wrote: > To silence compiler warnings about unhandled switch cases. > --- > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > index 3dac004..9969fac 100644 > --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > @@ -974,6 +974,7 @@ type_size(const struct glsl_type *type) > case GLSL_TYPE_UINT: > case GLSL_TYPE_INT: > case GLSL_TYPE_FLOAT: > + case GLSL_TYPE_DOUBLE: > case GLSL_TYPE_BOOL: >if (type->is_matrix()) { > return type->matrix_columns; Both here and in the other patch, I'd rather you put this along with the other "unexpected" types. The st/mesa patch will fix it up properly -- double has more complex type_size() requirements. -ilia ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev