summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_context.cpp
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-09-07 15:17:23 -0500
committerTim Rowley <[email protected]>2017-09-13 10:09:24 -0500
commit6f0fcec07a16eb48ebdafffd0b4ae0bb5ac611a4 (patch)
tree113f46f7e7eb085167982405c1984192df2e25d0 /src/gallium/drivers/swr/swr_context.cpp
parentae2412dbbdcff6583d7e4cf0430a409b86cb9e80 (diff)
swr/rast: Migrate memory pointers to gfxptr_t type
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_context.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_context.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp
index c058870f276..e95bd3bcaa4 100644
--- a/src/gallium/drivers/swr/swr_context.cpp
+++ b/src/gallium/drivers/swr/swr_context.cpp
@@ -152,12 +152,12 @@ swr_transfer_map(struct pipe_context *pipe,
for (int y = box->y; y < box->y + box->height; y++) {
if (spr->base.format == PIPE_FORMAT_Z24_UNORM_S8_UINT) {
for (int x = box->x; x < box->x + box->width; x++)
- spr->swr.pBaseAddress[zbase + 4 * x + 3] =
- spr->secondary.pBaseAddress[sbase + x];
+ ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 4 * x + 3] =
+ ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x];
} else if (spr->base.format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
for (int x = box->x; x < box->x + box->width; x++)
- spr->swr.pBaseAddress[zbase + 8 * x + 4] =
- spr->secondary.pBaseAddress[sbase + x];
+ ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 8 * x + 4] =
+ ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x];
}
zbase += spr->swr.pitch;
sbase += spr->secondary.pitch;
@@ -171,7 +171,7 @@ swr_transfer_map(struct pipe_context *pipe,
*transfer = pt;
- return spr->swr.pBaseAddress + offset + spr->mip_offsets[level];
+ return (void*)(spr->swr.xpBaseAddress + offset + spr->mip_offsets[level]);
}
static void
@@ -199,12 +199,12 @@ swr_transfer_flush_region(struct pipe_context *pipe,
for (int y = box.y; y < box.y + box.height; y++) {
if (spr->base.format == PIPE_FORMAT_Z24_UNORM_S8_UINT) {
for (int x = box.x; x < box.x + box.width; x++)
- spr->secondary.pBaseAddress[sbase + x] =
- spr->swr.pBaseAddress[zbase + 4 * x + 3];
+ ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x] =
+ ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 4 * x + 3];
} else if (spr->base.format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
for (int x = box.x; x < box.x + box.width; x++)
- spr->secondary.pBaseAddress[sbase + x] =
- spr->swr.pBaseAddress[zbase + 8 * x + 4];
+ ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x] =
+ ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 8 * x + 4];
}
zbase += spr->swr.pitch;
sbase += spr->secondary.pitch;