From: Nicolai Hähnle Date: Thu, 23 Nov 2017 09:25:34 +0000 (+0100) Subject: radeonsi: fix the R600_RESOURCE_FLAG_UNMAPPABLE check X-Git-Tag: upstream/18.1.0~3404 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e2962c9492e6a948516f6360f973e2e92034b01;p=platform%2Fupstream%2Fmesa.git 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 Tested-by: Dieter Nützel --- diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index ec282d5..f1c4780 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;