Mesa (master): radeonsi: fix the R600_RESOURCE_FLAG_UNMAPPABLE check
Nicolai Hähnle
nh at kemper.freedesktop.org
Wed Dec 6 10:19:22 UTC 2017
Module: Mesa
Branch: master
Commit: 5e2962c9492e6a948516f6360f973e2e92034b01
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e2962c9492e6a948516f6360f973e2e92034b01
Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date: Thu Nov 23 10:25:34 2017 +0100
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 at amd.com>
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
---
src/gallium/drivers/radeon/r600_buffer_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index ec282d55aa..f1c4780dfe 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;
More information about the mesa-commit
mailing list