From bc3a389d205296f202d5e736b652204251944967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 11 Aug 2014 16:40:43 +0200 Subject: [PATCH] radeon/uvd: fix gpu_address for video surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to get the new gpu_address as well when reallocating the cs buffer. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82428 Signed-off-by: Christian König --- src/gallium/drivers/r600/r600_uvd.c | 2 ++ src/gallium/drivers/radeonsi/si_uvd.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gallium/drivers/r600/r600_uvd.c b/src/gallium/drivers/r600/r600_uvd.c index f42384c..ee5288f 100644 --- a/src/gallium/drivers/r600/r600_uvd.c +++ b/src/gallium/drivers/r600/r600_uvd.c @@ -121,6 +121,8 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe, /* recreate the CS handle */ resources[i]->resource.cs_buf = ctx->b.ws->buffer_get_cs_handle( resources[i]->resource.buf); + resources[i]->resource.gpu_address = ctx->b.ws->buffer_get_virtual_address( + resources[i]->resource.cs_buf); } template.height *= array_size; diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c index 9f25cd6..0ba3b12 100644 --- a/src/gallium/drivers/radeonsi/si_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -106,6 +106,8 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, /* recreate the CS handle */ resources[i]->resource.cs_buf = ctx->b.ws->buffer_get_cs_handle( resources[i]->resource.buf); + resources[i]->resource.gpu_address = ctx->b.ws->buffer_get_virtual_address( + resources[i]->resource.cs_buf); } template.height *= array_size; -- 1.9.1