[Mesa-dev] [PATCH 06/10] r600g: update endian_format after operations
Oded Gabbay
oded.gabbay at gmail.com
Mon Apr 11 14:34:09 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 704cdf9..e5a1c65 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;
}
@@ -1313,6 +1315,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