diff options
author | Eric Anholt <[email protected]> | 2014-09-27 19:10:34 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-09-29 11:26:43 -0700 |
commit | c4245d8b2ecac4a2fd4207894a722be6177c60bc (patch) | |
tree | faf62201203fd6a09a68247cc440029508bfd78d /src/gallium/drivers/vc4/vc4_resource.c | |
parent | 7a85ebf6e211423c98bb045ad21026c5ffeaa9bb (diff) |
vc4: Rename the slice's size0.
In the other related fields, "0" refers to the size of the first miplevel,
while this is a field in a slice. The other implicit slices we have
(cubemap layers) don't vary in size compared to the first one.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_resource.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index a71ae5bab13..3fb0b99b7d5 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -152,7 +152,7 @@ vc4_resource_transfer_map(struct pipe_context *pctx, return buf + slice->offset + box->y / util_format_get_blockheight(format) * ptrans->stride + box->x / util_format_get_blockwidth(format) * rsc->cpp + - box->z * slice->size0; + box->z * slice->size; } @@ -226,12 +226,12 @@ vc4_setup_slices(struct vc4_resource *rsc) slice->offset = offset; slice->stride = level_width * rsc->cpp; - slice->size0 = level_height * slice->stride; + slice->size = level_height * slice->stride; /* Note, since we have cubes but no 3D, depth is invariant * with miplevel. */ - offset += slice->size0 * depth; + offset += slice->size * depth; } /* The texture base pointer that has to point to level 0 doesn't have @@ -306,7 +306,7 @@ vc4_resource_create(struct pipe_screen *pscreen, rsc->bo = vc4_bo_alloc(vc4_screen(pscreen), rsc->slices[0].offset + - rsc->slices[0].size0 * prsc->depth0, + rsc->slices[0].size * prsc->depth0, "resource"); if (!rsc->bo) goto fail; |