[Mesa-dev] [PATCH v2 07/11] r600g: update endian_format after operations

Oded Gabbay oded.gabbay at gmail.com
Thu Apr 14 12:18:50 UTC 2016


After operations are done, where resources have been copied to the GPU,
we need to mark those resources as little-endian for future operations on
them.

Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
---
 src/gallium/drivers/radeon/r600_texture.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 0275808..390b711 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -99,6 +99,8 @@ static void r600_copy_from_staging_texture(struct pipe_context *ctx, struct r600
 		r600_copy_region_with_blit(ctx, dst, transfer->level,
 					   transfer->box.x, transfer->box.y, transfer->box.z,
 					   src, 0, &sbox);
+		/* texture is now inside GPU, so mark it accordingly */
+		dst->endian_format = PIPE_ENDIAN_LITTLE;
 		return;
 	}
 
@@ -1320,6 +1322,8 @@ static void r600_texture_transfer_unmap(struct pipe_context *ctx,
 						  transfer->box.x, transfer->box.y, transfer->box.z,
 						  &rtransfer->staging->b.b, transfer->level,
 						  &transfer->box);
+			/* texture is now inside GPU, so mark it accordingly */
+			texture->endian_format = PIPE_ENDIAN_LITTLE;
 		} else {
 			r600_copy_from_staging_texture(ctx, rtransfer);
 		}
-- 
2.5.5



More information about the mesa-dev mailing list