This doesn't actually work -- call_link_visitor::find_matching_signature passes a NULL state pointer in here.
On Sun, Apr 27, 2014 at 9:44 PM, Chris Forbes <chr...@ijw.co.nz> wrote: > Signed-off-by: Chris Forbes <chr...@ijw.co.nz> > --- > src/glsl/glsl_types.cpp | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp > index eb03a66..39c34c0 100644 > --- a/src/glsl/glsl_types.cpp > +++ b/src/glsl/glsl_types.cpp > @@ -688,10 +688,20 @@ glsl_type::can_implicitly_convert_to(const glsl_type > *desired, > if (this->matrix_columns > 1 || desired->matrix_columns > 1) > return false; > > + /* Vector size must match. */ > + if (this->vector_elements != desired->vector_elements) > + return false; > + > /* int and uint can be converted to float. */ > - return desired->is_float() > - && this->is_integer() > - && this->vector_elements == desired->vector_elements; > + if (desired->is_float() && this->is_integer()) > + return true; > + > + /* With GLSL 4.0 / ARB_gpu_shader5, int can be converted to uint. */ > + if ((state->is_version(400, 0) || state->ARB_gpu_shader5_enable) && > + desired->base_type == GLSL_TYPE_UINT && this->base_type == > GLSL_TYPE_INT) > + return true; > + > + return false; > } > > unsigned > -- > 1.9.2 > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev