summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index dbec259d7f3..0c83c68afa9 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -302,7 +302,9 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
ws->cman->destroy(ws->cman);
ws->kman->destroy(ws->kman);
- radeon_surface_manager_free(ws->surf_man);
+ if (ws->gen == R600) {
+ radeon_surface_manager_free(ws->surf_man);
+ }
FREE(rws);
}
@@ -377,9 +379,11 @@ struct radeon_winsys *radeon_drm_winsys_create(int fd)
goto fail;
/* FIXME check for libdrm version ?? */
- ws->surf_man = radeon_surface_manager_new(fd);
- if (!ws->surf_man)
- goto fail;
+ if (ws->gen == R600) {
+ ws->surf_man = radeon_surface_manager_new(fd);
+ if (!ws->surf_man)
+ goto fail;
+ }
/* Set functions. */
ws->base.destroy = radeon_winsys_destroy;