Mesa (master): r600g: don't check the R600_GLSL130 env var

Marek Olšák mareko at kemper.freedesktop.org
Sun Jul 15 00:17:02 UTC 2012


Module: Mesa
Branch: master
Commit: 15ca9d159e50815b0bfe60df8873f48c32a59ca5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=15ca9d159e50815b0bfe60df8873f48c32a59ca5

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sat Jul 14 22:28:26 2012 +0200

r600g: don't check the R600_GLSL130 env var

GLSL 1.3 has been enabled by default for quite a while.

---

 src/gallium/drivers/r600/r600_pipe.c   |    6 ++----
 src/gallium/drivers/r600/r600_pipe.h   |    1 -
 src/gallium/drivers/r600/r600_shader.c |    2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 7750c42..a143381 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -391,7 +391,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 		return 256;
 
 	case PIPE_CAP_GLSL_FEATURE_LEVEL:
-		return rscreen->glsl_feature_level;
+		return 130;
 
 	/* Supported except the original R600. */
 	case PIPE_CAP_INDEP_BLEND_ENABLE:
@@ -489,7 +489,6 @@ static float r600_get_paramf(struct pipe_screen* pscreen,
 
 static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enum pipe_shader_cap param)
 {
-	struct r600_screen *rscreen = (struct r600_screen *)pscreen;
 	switch(shader)
 	{
 	case PIPE_SHADER_FRAGMENT:
@@ -539,7 +538,7 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
 	case PIPE_SHADER_CAP_SUBROUTINES:
 		return 0;
 	case PIPE_SHADER_CAP_INTEGERS:
-		return rscreen->glsl_feature_level >= 130;
+		return 1;
 	case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
 		return 16;
         case PIPE_SHADER_CAP_PREFERRED_IR:
@@ -952,7 +951,6 @@ 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", TRUE) ? 130 : 120;
 
 	rscreen->global_pool = compute_memory_pool_new(rscreen);
 
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 0581040..6449a4d 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -143,7 +143,6 @@ struct r600_screen {
 	struct r600_pipe_fences		fences;
 
 	bool				use_surface_alloc;
-	int 				glsl_feature_level;
 
 	/*for compute global memory binding, we allocate stuff here, instead of
 	 * buffers.
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 4dd4243..cf912c1 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1163,7 +1163,7 @@ static int r600_shader_from_tgsi(struct r600_context * rctx, struct r600_pipe_sh
 #endif
 	ctx.bc = &shader->bc;
 	ctx.shader = shader;
-	ctx.native_integers = (rctx->screen->glsl_feature_level >= 130);
+	ctx.native_integers = true;
 
 	r600_bytecode_init(ctx.bc, rctx->chip_class, rctx->family);
 	ctx.tokens = tokens;




More information about the mesa-commit mailing list