radeonsi: ignore PIPE_RESOURCE_FLAG_MAP_COHERENT
authorMarek Olšák <marek.olsak@amd.com>
Sat, 9 Jun 2018 02:29:55 +0000 (22:29 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 19 Jun 2018 16:52:28 +0000 (12:52 -0400)
We treat coherent and non-coherent buffers the same.

And move external_usage for better packing.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/drivers/radeonsi/si_buffer.c
src/gallium/drivers/radeonsi/si_pipe.h

index 0546fa9d336531363c6a441bf46fd33cc44be269..5bd95bffc171de35ba8196015221cd725920d0ed 100644 (file)
@@ -142,8 +142,7 @@ void si_init_resource_fields(struct si_screen *sscreen,
        }
 
        if (res->b.b.target == PIPE_BUFFER &&
-           res->b.b.flags & (PIPE_RESOURCE_FLAG_MAP_PERSISTENT |
-                             PIPE_RESOURCE_FLAG_MAP_COHERENT)) {
+           res->b.b.flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) {
                /* Use GTT for all persistent mappings with older
                 * kernels, because they didn't always flush the HDP
                 * cache before CS execution.
index eb0c226ed79cdb839ce5a1c5cecf8b035de1a38d..5ff762296fc35130c0e5c7f1037533d44c5bb666 100644 (file)
@@ -216,12 +216,12 @@ struct r600_resource {
         */
        bool                            TC_L2_dirty;
 
-       /* Whether the resource has been exported via resource_get_handle. */
-       unsigned                        external_usage; /* PIPE_HANDLE_USAGE_* */
-
        /* Whether this resource is referenced by bindless handles. */
        bool                            texture_handle_allocated;
        bool                            image_handle_allocated;
+
+       /* Whether the resource has been exported via resource_get_handle. */
+       unsigned                        external_usage; /* PIPE_HANDLE_USAGE_* */
 };
 
 struct r600_transfer {