summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_screen.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 3e9a3f3b2f9..31f596c260f 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -70,7 +70,7 @@ static const struct debug_named_value debug_options[] = {
{"noopt", FD_DBG_NOOPT , "Disable optimization passes in compiler"},
{"optmsgs", FD_DBG_OPTMSGS,"Enable optimizater debug messages"},
{"optdump", FD_DBG_OPTDUMP,"Dump shader DAG to .dot files"},
- {"glsl130", FD_DBG_GLSL130,"Temporary flag to enable GLSL 130 on a3xx+"},
+ {"glsl120", FD_DBG_GLSL120,"Temporary flag to force GLSL 120 (rather than 130) on a3xx+"},
{"nocp", FD_DBG_NOCP, "Disable copy-propagation"},
DEBUG_NAMED_VALUE_END
};
@@ -79,7 +79,7 @@ DEBUG_GET_ONCE_FLAGS_OPTION(fd_mesa_debug, "FD_MESA_DEBUG", debug_options, 0)
int fd_mesa_debug = 0;
bool fd_binning_enabled = true;
-static bool glsl130 = false;
+static bool glsl120 = false;
static const char *
fd_screen_get_name(struct pipe_screen *pscreen)
@@ -177,7 +177,9 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 256;
case PIPE_CAP_GLSL_FEATURE_LEVEL:
- return ((is_a3xx(screen) || is_a4xx(screen)) && glsl130) ? 130 : 120;
+ if (glsl120)
+ return 120;
+ return (is_a3xx(screen) || is_a4xx(screen)) ? 130 : 120;
/* Unsupported features. */
case PIPE_CAP_INDEP_BLEND_ENABLE:
@@ -366,13 +368,9 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
return 1;
case PIPE_SHADER_CAP_INTEGERS:
- /* we should be able to support this on a3xx, but not
- * implemented yet:
- *
- * TODO looks like a4xx will require some additional
- * work for integer varying fetch..
- */
- return ((is_a3xx(screen) || is_a4xx(screen)) && glsl130) ? 1 : 0;
+ if (glsl120)
+ return 0;
+ return (is_a3xx(screen) || is_a4xx(screen)) ? 1 : 0;
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
return 16;
@@ -445,7 +443,7 @@ fd_screen_create(struct fd_device *dev)
if (fd_mesa_debug & FD_DBG_NOBIN)
fd_binning_enabled = false;
- glsl130 = !!(fd_mesa_debug & FD_DBG_GLSL130);
+ glsl120 = !!(fd_mesa_debug & FD_DBG_GLSL120);
if (!screen)
return NULL;