summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 5b1f941521b..f1b2cd96bcf 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1862,6 +1862,7 @@ void vi_dcc_disable_if_incompatible_format(struct r600_common_context *rctx,
struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
struct pipe_resource *texture,
const struct pipe_surface *templ,
+ unsigned width0, unsigned height0,
unsigned width, unsigned height)
{
struct r600_common_context *rctx = (struct r600_common_context*)pipe;
@@ -1881,6 +1882,9 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
surface->base.height = height;
surface->base.u = templ->u;
+ surface->width0 = width0;
+ surface->height0 = height0;
+
if (texture->target != PIPE_BUFFER)
vi_dcc_disable_if_incompatible_format(rctx, texture,
templ->u.tex.level,
@@ -1917,7 +1921,9 @@ static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
}
}
- return r600_create_surface_custom(pipe, tex, templ, width, height);
+ return r600_create_surface_custom(pipe, tex, templ,
+ tex->width0, tex->height0,
+ width, height);
}
static void r600_surface_destroy(struct pipe_context *pipe,