summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-11-23 10:25:34 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2017-12-14 22:56:46 +0000
commit839677431387acc9a10328a48943d4d4c32ea579 (patch)
treeea23188d5b99084e1508d0fe91f5b3ce7ea131e2
parent9d9f6b36337611a4595f23bdf808b627b5b76425 (diff)
downloadmesa-839677431387acc9a10328a48943d4d4c32ea579.tar.gz
radeonsi: fix the R600_RESOURCE_FLAG_UNMAPPABLE check
The flag is on the pipe_resource, not the r600_resource. I don't see an obvious bug related to this, but it could potentially lead to suboptimal placement of some resources. Fixes: a41587433c4d ("gallium/radeon: add R600_RESOURCE_FLAG_UNMAPPABLE") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> (cherry picked from commit 5e2962c9492e6a948516f6360f973e2e92034b01)
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 58b213f51d1..366581d45e6 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -161,7 +161,7 @@ void si_init_resource_fields(struct r600_common_screen *rscreen,
/* Tiled textures are unmappable. Always put them in VRAM. */
if ((res->b.b.target != PIPE_BUFFER && !rtex->surface.is_linear) ||
- res->flags & R600_RESOURCE_FLAG_UNMAPPABLE) {
+ res->b.b.flags & R600_RESOURCE_FLAG_UNMAPPABLE) {
res->domains = RADEON_DOMAIN_VRAM;
res->flags |= RADEON_FLAG_NO_CPU_ACCESS |
RADEON_FLAG_GTT_WC;