diff options
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_transfer.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_transfer.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_transfer.c b/src/gallium/drivers/nvc0/nvc0_transfer.c index a38bdb8f0a6..7bbfe057e58 100644 --- a/src/gallium/drivers/nvc0/nvc0_transfer.c +++ b/src/gallium/drivers/nvc0/nvc0_transfer.c @@ -4,7 +4,7 @@ #include "nvc0_context.h" #include "nvc0_transfer.h" -#include "nv50_defs.xml.h" +#include "nv50/nv50_defs.xml.h" struct nvc0_transfer { struct pipe_transfer base; @@ -14,7 +14,7 @@ struct nvc0_transfer { uint16_t nlayers; }; -static void +void nvc0_m2mf_transfer_rect(struct pipe_screen *pscreen, const struct nvc0_m2mf_rect *dst, const struct nvc0_m2mf_rect *src, @@ -243,35 +243,23 @@ nvc0_miptree_transfer_new(struct pipe_context *pctx, struct nvc0_miptree_level *lvl = &mt->level[level]; struct nvc0_transfer *tx; uint32_t size; - uint32_t w, h, d, z, layer, box_h, box_y; + uint32_t w, h, d, z, layer; int ret; tx = CALLOC_STRUCT(nvc0_transfer); if (!tx) return NULL; - box_y = box->y; - box_h = box->height; - if (mt->layout_3d) { z = box->z; d = u_minify(res->depth0, level); layer = 0; - tx->nlayers = box->depth; } else { z = 0; d = 1; - if (res->target == PIPE_TEXTURE_1D || - res->target == PIPE_TEXTURE_1D_ARRAY) { - box_y = 0; - box_h = 1; - layer = box->y; - tx->nlayers = box->height; - } else { - layer = box->z; - tx->nlayers = box->depth; - } + layer = box->z; } + tx->nlayers = box->depth; pipe_resource_reference(&tx->base.resource, res); @@ -280,7 +268,7 @@ nvc0_miptree_transfer_new(struct pipe_context *pctx, tx->base.box = *box; tx->nblocksx = util_format_get_nblocksx(res->format, box->width); - tx->nblocksy = util_format_get_nblocksy(res->format, box_h); + tx->nblocksy = util_format_get_nblocksy(res->format, box->height); tx->base.stride = tx->nblocksx * util_format_get_blocksize(res->format); tx->base.layer_stride = tx->nblocksy * tx->base.stride; @@ -294,7 +282,7 @@ nvc0_miptree_transfer_new(struct pipe_context *pctx, tx->rect[0].base = lvl->offset + layer * mt->layer_stride; tx->rect[0].tile_mode = lvl->tile_mode; tx->rect[0].x = util_format_get_nblocksx(res->format, box->x); - tx->rect[0].y = util_format_get_nblocksy(res->format, box_y); + tx->rect[0].y = util_format_get_nblocksy(res->format, box->y); tx->rect[0].z = z; tx->rect[0].width = util_format_get_nblocksx(res->format, w); tx->rect[0].height = util_format_get_nblocksy(res->format, h); |