gallium/radeon: make sure the address of separate CMASK is aligned properly
authorMarek Olšák <marek.olsak@amd.com>
Mon, 24 Oct 2016 19:16:11 +0000 (21:16 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 26 Oct 2016 11:02:58 +0000 (13:02 +0200)
This should fix random GPU hangs on Hawaii and Fiji.

Cc: 11.2 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index b57cc9220709c68ffb505973dabd5e3041c9f9a4..27035c0faab63cc00bff3d92a9625afb0a8706a8 100644 (file)
@@ -826,8 +826,9 @@ static void r600_texture_alloc_cmask_separate(struct r600_common_screen *rscreen
        }
 
        rtex->cmask_buffer = (struct r600_resource *)
-               pipe_buffer_create(&rscreen->b, PIPE_BIND_CUSTOM,
-                                  PIPE_USAGE_DEFAULT, rtex->cmask.size);
+               r600_aligned_buffer_create(&rscreen->b, 0, PIPE_USAGE_DEFAULT,
+                                          rtex->cmask.size,
+                                          rtex->cmask.alignment);
        if (rtex->cmask_buffer == NULL) {
                rtex->cmask.size = 0;
                return;