From be73d358298b04624cdeca7113eedd10e3e37e6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 24 Feb 2016 17:33:28 +0100 Subject: [PATCH] gallium/radeon: don't set texture metadata for buffers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_texture.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 5e77080eed2..558dc73d9d4 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -261,8 +261,11 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen, if (!res->is_shared) { res->is_shared = true; - r600_texture_init_metadata(rtex, &metadata); - rscreen->ws->buffer_set_metadata(res->buf, &metadata); + + if (resource->target != PIPE_BUFFER) { + r600_texture_init_metadata(rtex, &metadata); + rscreen->ws->buffer_set_metadata(res->buf, &metadata); + } } return rscreen->ws->buffer_get_handle(res->buf, -- 2.30.2