r600g: store glsl_feature_level in the r600_screen
authorVadim Girlin <vadimgirlin@gmail.com>
Mon, 9 Apr 2012 15:35:39 +0000 (19:35 +0400)
committerDave Airlie <airlied@redhat.com>
Fri, 20 Apr 2012 16:43:24 +0000 (17:43 +0100)
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h

index 49c79f16ffa3237554449d8b8751bd7d4896f107..b1bb26a02273cf3fcb9085ba825ebb8310918dd7 100644 (file)
@@ -405,7 +405,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
                return 1;
 
        case PIPE_CAP_GLSL_FEATURE_LEVEL:
-               return debug_get_bool_option("R600_GLSL130", FALSE) ? 130 : 120;
+               return rscreen->glsl_feature_level;
 
        /* Supported except the original R600. */
        case PIPE_CAP_INDEP_BLEND_ENABLE:
@@ -875,6 +875,7 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
        pipe_mutex_init(rscreen->fences.mutex);
 
        rscreen->use_surface_alloc = debug_get_bool_option("R600_SURF", TRUE);
+       rscreen->glsl_feature_level = debug_get_bool_option("R600_GLSL130", FALSE) ? 130 : 120;
 
        return &rscreen->screen;
 }
index fafc4364043ab200aac49b9979a751d44ce87c80..fd134fae0c6b75abda45d1ea284176578a4e5592 100644 (file)
@@ -124,6 +124,7 @@ struct r600_screen {
 
        unsigned                        num_contexts;
        bool                            use_surface_alloc;
+       int                             glsl_feature_level;
 
        /* for thread-safe write accessing to num_contexts */
        pipe_mutex                      mutex_num_contexts;