From: Michel Dänzer Date: Mon, 22 Aug 2011 13:44:43 +0000 (+0200) Subject: r600g: Handle PIPE_TRANSFER_MAP_DIRECTLY. X-Git-Tag: android-x86-4.4-r1~10387^2~6 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=702838a7061cde91a6bcdd3382817deb61218bf1;p=android-x86%2Fexternal-mesa.git r600g: Handle PIPE_TRANSFER_MAP_DIRECTLY. If the state tracker tries to map the resource directly but we can't or don't want to do that, fail to create a transfer. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher --- diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index e41fe11ac97..7c1bd9d8ec6 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -647,6 +647,9 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx, (texture->flags & R600_RESOURCE_FLAG_TRANSFER)) use_staging_texture = FALSE; + if (use_staging_texture && (usage & PIPE_TRANSFER_MAP_DIRECTLY)) + return NULL; + trans = CALLOC_STRUCT(r600_transfer); if (trans == NULL) return NULL;