summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-11-23 10:25:34 +0100
committerNicolai Hähnle <[email protected]>2017-12-06 11:18:14 +0100
commit5e2962c9492e6a948516f6360f973e2e92034b01 (patch)
treea5aad2a5b622aa146b28ef3b2f6c9e1950b3e8e6
parenta1e257a5bfaa0e1b3bbfd9846311b8f419d4c626 (diff)
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 <[email protected]> Tested-by: Dieter Nützel <[email protected]>
-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 ec282d55aaf..f1c4780dfea 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -159,7 +159,7 @@ void si_init_resource_fields(struct si_screen *sscreen,
/* 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;