On Sun, Oct 20, 2013 at 11:00 PM, Brian Paul <bri...@vmware.com> wrote: > On 10/20/2013 01:07 PM, Dave Airlie wrote: >> >> From: Dave Airlie <airl...@redhat.com> >> >> If a driver wants to expose higher glsl levels have the state tracker >> respect them. >> >> Signed-off-by: Dave Airlie <airl...@redhat.com> >> --- >> src/mesa/state_tracker/st_extensions.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/src/mesa/state_tracker/st_extensions.c >> b/src/mesa/state_tracker/st_extensions.c >> index 97dd732..ceb6f31 100644 >> --- a/src/mesa/state_tracker/st_extensions.c >> +++ b/src/mesa/state_tracker/st_extensions.c >> @@ -591,7 +591,11 @@ void st_init_extensions(struct st_context *st) >> /* Figure out GLSL support. */ >> glsl_feature_level = screen->get_param(screen, >> PIPE_CAP_GLSL_FEATURE_LEVEL); >> >> - if (glsl_feature_level >= 140) { >> + if (glsl_feature_level >= 330) { >> + ctx->Const.GLSLVersion = 330; >> + } else if (glsl_feature_level >= 150) { >> + ctx->Const.GLSLVersion = 150; >> + } else if (glsl_feature_level >= 140) { >> ctx->Const.GLSLVersion = 140; >> } else if (glsl_feature_level >= 130) { >> ctx->Const.GLSLVersion = 130; >> > > Can't this code be simplified to read > > ctx->Const.GLSLVersion = screen->get_param(screen, > PIPE_CAP_GLSL_FEATURE_LEVEL);
Well for a while nouveau reported 150 when the mesa side could only handle 140, So I'm not sure how that would work out all the time if drivers when ahead of mesa. Dave. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev