summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_gmem.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-12-12 18:51:36 -0500
committerRob Clark <[email protected]>2014-12-13 15:09:37 -0500
commitf24e910da40c7c813b7da009269cd994cf6ff375 (patch)
tree2881d2d8038f1856cfd44687fed65dd9bbec1f8c /src/gallium/drivers/freedreno/freedreno_gmem.c
parent7474de2235beee9240be702ab99b93989fa7c7c1 (diff)
freedreno: add is_a3xx()/is_a4xx() helpers
A bunch of open-coded 'gpu_id > 300's seems like it will eventually cause problems with future generations. There were already a few minor problems with caps for features that still need additional work on a4xx. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_gmem.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_gmem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c
index 392c547c137..4040d1f7615 100644
--- a/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -69,7 +69,9 @@
static uint32_t bin_width(struct fd_context *ctx)
{
- if (ctx->screen->gpu_id >= 300)
+ if (is_a4xx(ctx->screen))
+ return 1024;
+ if (is_a3xx(ctx->screen))
return 992;
return 512;
}