gallium/radeon: remove flags specific to libdrm_radeon from winsys interface
authorMarek Olšák <marek.olsak@amd.com>
Sun, 23 Oct 2016 19:03:40 +0000 (21:03 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 26 Oct 2016 11:02:58 +0000 (13:02 +0200)
These just say whether libdrm can assume that the latest radeon_surface
definition is used by Mesa.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_texture.c
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/winsys/radeon/drm/radeon_drm_surface.c

index 4d4be972175e926267c0a89670895203a7c1d0b5..dcfa7cd4abe1eb2a8801f3f278b1107afb9169ea 100644 (file)
@@ -233,14 +233,8 @@ static int r600_init_surface(struct r600_common_screen *rscreen,
                        flags |= RADEON_SURF_TC_COMPATIBLE_HTILE;
                }
 
-               if (is_stencil) {
-                       flags |= RADEON_SURF_SBUFFER |
-                                RADEON_SURF_HAS_SBUFFER_MIPTREE;
-               }
-       }
-
-       if (rscreen->chip_class >= SI) {
-               flags |= RADEON_SURF_HAS_TILE_MODE_INDEX;
+               if (is_stencil)
+                       flags |= RADEON_SURF_SBUFFER;
        }
 
        if (rscreen->chip_class >= VI &&
@@ -605,10 +599,6 @@ void r600_texture_get_fmask_info(struct r600_common_screen *rscreen,
        fmask.mtilea = rtex->surface.mtilea;
        fmask.tile_split = rtex->surface.tile_split;
 
-       if (rscreen->chip_class >= SI) {
-               flags |= RADEON_SURF_HAS_TILE_MODE_INDEX;
-       }
-
        switch (nr_samples) {
        case 2:
        case 4:
index bf4bb8251ae731d8ff45d7d0482e814553cd38b5..29b64c0238ec1edfee9bb14cfd1572fca14f9531 100644 (file)
@@ -268,8 +268,7 @@ enum radeon_surf_mode {
 #define RADEON_SURF_ZBUFFER                     (1 << 17)
 #define RADEON_SURF_SBUFFER                     (1 << 18)
 #define RADEON_SURF_Z_OR_SBUFFER                (RADEON_SURF_ZBUFFER | RADEON_SURF_SBUFFER)
-#define RADEON_SURF_HAS_SBUFFER_MIPTREE         (1 << 19)
-#define RADEON_SURF_HAS_TILE_MODE_INDEX         (1 << 20)
+/* bits 19 and 20 are reserved for libdrm_radeon, don't use them */
 #define RADEON_SURF_FMASK                       (1 << 21)
 #define RADEON_SURF_DISABLE_DCC                 (1 << 22)
 #define RADEON_SURF_TC_COMPATIBLE_HTILE         (1 << 23)
index ed614064ce8f0278be90dfc9e913e4ff4bdfc80c..e35f8a4e72e7ae9503e83842b0849f2e0be0ac58 100644 (file)
@@ -112,7 +112,9 @@ static void surf_winsys_to_drm(struct radeon_surface *surf_drm,
     surf_drm->flags = flags;
     surf_drm->flags = RADEON_SURF_CLR(surf_drm->flags, TYPE);
     surf_drm->flags = RADEON_SURF_CLR(surf_drm->flags, MODE);
-    surf_drm->flags |= RADEON_SURF_SET(mode, MODE);
+    surf_drm->flags |= RADEON_SURF_SET(mode, MODE) |
+                       RADEON_SURF_HAS_SBUFFER_MIPTREE |
+                       RADEON_SURF_HAS_TILE_MODE_INDEX;
 
     switch (tex->target) {
     case PIPE_TEXTURE_1D: