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.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index ce105b8786b..19379a8b024 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -193,13 +193,13 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_SM3:
case PIPE_CAP_PRIMITIVE_RESTART:
- return (screen->gpu_id >= 300) ? 1 : 0;
+ return is_a3xx(screen) || is_a4xx(screen);
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 256;
case PIPE_CAP_GLSL_FEATURE_LEVEL:
- return ((screen->gpu_id >= 300) && glsl130) ? 130 : 120;
+ return ((is_a3xx(screen) || is_a4xx(screen)) && glsl130) ? 130 : 120;
/* Unsupported features. */
case PIPE_CAP_INDEP_BLEND_ENABLE:
@@ -257,7 +257,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 11;
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
- return (screen->gpu_id >= 300) ? 256 : 0;
+ return (is_a3xx(screen) || is_a4xx(screen)) ? 256 : 0;
/* Render targets. */
case PIPE_CAP_MAX_RENDER_TARGETS:
@@ -268,7 +268,10 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_QUERY_TIMESTAMP:
return 0;
case PIPE_CAP_OCCLUSION_QUERY:
- return (screen->gpu_id >= 300) ? 1 : 0;
+ /* TODO still missing on a4xx, but we lie to get gl2..
+ * it's not a feature, it's a bug!
+ */
+ return is_a3xx(screen) || is_a4xx(screen);
case PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET:
case PIPE_CAP_MIN_TEXEL_OFFSET:
@@ -362,7 +365,7 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
* split between VS and FS. Use lower limit of 256 to
* avoid getting into impossible situations:
*/
- return ((screen->gpu_id >= 300) ? 256 : 64) * sizeof(float[4]);
+ return ((is_a3xx(screen) || is_a4xx(screen)) ? 256 : 64) * sizeof(float[4]);
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
return 1;
case PIPE_SHADER_CAP_MAX_PREDS:
@@ -382,8 +385,11 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
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 ((screen->gpu_id >= 300) && glsl130) ? 1 : 0;
+ return (is_a3xx(screen) && glsl130) ? 1 : 0;
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
return 16;