/* unmap */
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
return TRUE;
}
/* unmap */
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
pipe->transfer_unmap(pipe, transfer);
error:
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
PIPE_TRANSFER_READ, 0, 0, surface->width,
surface->height);
- debug_dump_transfer_bmp(filename, transfer);
+ debug_dump_transfer_bmp(pipe, filename, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
#endif
}
void
-debug_dump_transfer_bmp(const char *filename,
+debug_dump_transfer_bmp(struct pipe_context *pipe,
+ const char *filename,
struct pipe_transfer *transfer)
{
#ifndef PIPE_SUBSYSTEM_WINDOWS_MINIPORT
if(!rgba)
goto error1;
- pipe_get_tile_rgba(transfer, 0, 0,
+ pipe_get_tile_rgba(pipe, transfer, 0, 0,
transfer->width, transfer->height,
rgba);
void debug_dump_surface_bmp(struct pipe_context *pipe,
const char *filename,
struct pipe_surface *surface);
-void debug_dump_transfer_bmp(const char *filename,
+void debug_dump_transfer_bmp(struct pipe_context *pipe,
+ const char *filename,
struct pipe_transfer *transfer);
void debug_dump_float_rgba_bmp(const char *filename,
unsigned width, unsigned height,
pipe->transfer_unmap(pipe, srcTrans);
pipe->transfer_unmap(pipe, dstTrans);
- pipe->tex_transfer_destroy(srcTrans);
- pipe->tex_transfer_destroy(dstTrans);
+ pipe->tex_transfer_destroy(pipe, srcTrans);
+ pipe->tex_transfer_destroy(pipe, dstTrans);
}
}
pipe->transfer_unmap(pipe, srcTrans);
pipe->transfer_unmap(pipe, dstTrans);
- pipe->tex_transfer_destroy(srcTrans);
- pipe->tex_transfer_destroy(dstTrans);
+ pipe->tex_transfer_destroy(pipe, srcTrans);
+ pipe->tex_transfer_destroy(pipe, dstTrans);
}
}
pipe->transfer_unmap(pipe, srcTrans);
pipe->transfer_unmap(pipe, dstTrans);
- pipe->tex_transfer_destroy(srcTrans);
- pipe->tex_transfer_destroy(dstTrans);
+ pipe->tex_transfer_destroy(pipe, srcTrans);
+ pipe->tex_transfer_destroy(pipe, dstTrans);
}
#else
(void) reduce_3d;
}
static INLINE void *
-pipe_transfer_map( struct pipe_transfer *transf )
+pipe_transfer_map( struct pipe_context *context,
+ struct pipe_transfer *transf )
{
- struct pipe_context *context = transf->pipe;
return context->transfer_map(context, transf);
}
static INLINE void
-pipe_transfer_unmap( struct pipe_transfer *transf )
+pipe_transfer_unmap( struct pipe_context *context,
+ struct pipe_transfer *transf )
{
- struct pipe_context *context = transf->pipe;
context->transfer_unmap(context, transf);
}
static INLINE void
-pipe_transfer_destroy( struct pipe_transfer *transf )
+pipe_transfer_destroy( struct pipe_context *context,
+ struct pipe_transfer *transfer )
{
- struct pipe_context *context = transf->pipe;
- context->tex_transfer_destroy(transf);
+ context->tex_transfer_destroy(context, transfer);
}
static INLINE unsigned
pipe->transfer_unmap(pipe, src_trans);
pipe->transfer_unmap(pipe, dst_trans);
- pipe->tex_transfer_destroy(src_trans);
- pipe->tex_transfer_destroy(dst_trans);
+ pipe->tex_transfer_destroy(pipe, src_trans);
+ pipe->tex_transfer_destroy(pipe, dst_trans);
}
}
pipe->transfer_unmap(pipe, dst_trans);
- pipe->tex_transfer_destroy(dst_trans);
+ pipe->tex_transfer_destroy(pipe, dst_trans);
}
* Move raw block of pixels from transfer object to user memory.
*/
void
-pipe_get_tile_raw(struct pipe_transfer *pt,
+pipe_get_tile_raw(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
void *dst, int dst_stride)
{
- struct pipe_context *pipe = pt->pipe;
const void *src;
if (dst_stride == 0)
* Move raw block of pixels from user memory to transfer object.
*/
void
-pipe_put_tile_raw(struct pipe_transfer *pt,
+pipe_put_tile_raw(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const void *src, int src_stride)
{
- struct pipe_context *pipe = pt->pipe;
void *dst;
enum pipe_format format = pt->texture->format;
void
-pipe_get_tile_rgba(struct pipe_transfer *pt,
+pipe_get_tile_rgba(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
float *p)
{
if(format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV)
assert((x & 1) == 0);
- pipe_get_tile_raw(pt, x, y, w, h, packed, 0);
+ pipe_get_tile_raw(pipe, pt, x, y, w, h, packed, 0);
pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride);
void
-pipe_put_tile_rgba(struct pipe_transfer *pt,
+pipe_put_tile_rgba(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const float *p)
{
0, 0, w, h);
}
- pipe_put_tile_raw(pt, x, y, w, h, packed, 0);
+ pipe_put_tile_raw(pipe, pt, x, y, w, h, packed, 0);
FREE(packed);
}
* Get a block of Z values, converted to 32-bit range.
*/
void
-pipe_get_tile_z(struct pipe_transfer *pt,
+pipe_get_tile_z(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
uint *z)
{
- struct pipe_context *pipe = pt->pipe;
const uint dstStride = w;
ubyte *map;
uint *pDest = z;
void
-pipe_put_tile_z(struct pipe_transfer *pt,
+pipe_put_tile_z(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const uint *zSrc)
{
- struct pipe_context *pipe = pt->pipe;
const uint srcStride = w;
const uint *ptrc = zSrc;
ubyte *map;
#endif
void
-pipe_get_tile_raw(struct pipe_transfer *pt,
+pipe_get_tile_raw(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
void *p, int dst_stride);
void
-pipe_put_tile_raw(struct pipe_transfer *pt,
+pipe_put_tile_raw(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const void *p, int src_stride);
void
-pipe_get_tile_rgba(struct pipe_transfer *pt,
+pipe_get_tile_rgba(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
float *p);
void
-pipe_put_tile_rgba(struct pipe_transfer *pt,
+pipe_put_tile_rgba(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const float *p);
void
-pipe_get_tile_z(struct pipe_transfer *pt,
+pipe_get_tile_z(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
uint *z);
void
-pipe_put_tile_z(struct pipe_transfer *pt,
+pipe_put_tile_z(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const uint *z);
for (i = 0; i < 3; ++i) {
r->pipe->transfer_unmap(r->pipe, r->tex_transfer[i]);
- r->pipe->tex_transfer_destroy(r->tex_transfer[i]);
+ r->pipe->tex_transfer_destroy(r->pipe, r->tex_transfer[i]);
}
}
trans = CALLOC_STRUCT(i915_transfer);
if (trans) {
pipe_texture_reference(&trans->base.texture, texture);
- trans->base.pipe = pipe;
trans->base.x = x;
trans->base.y = y;
trans->base.width = w;
}
static void
-i915_tex_transfer_destroy(struct pipe_transfer *trans)
+i915_tex_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *trans)
{
pipe_texture_reference(&trans->texture, NULL);
FREE(trans);
struct brw_winsys_buffer *bo );
+
#endif /* BRW_SCREEN_H */
trans = CALLOC_STRUCT(brw_transfer);
if (trans) {
pipe_texture_reference(&trans->base.texture, texture);
- trans->base.pipe = pipe;
trans->base.x = x;
trans->base.y = y;
trans->base.width = w;
}
static void
-brw_tex_transfer_destroy(struct pipe_transfer *trans)
+brw_tex_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *trans)
{
pipe_texture_reference(&trans->texture, NULL);
FREE(trans);
}
static void
-identity_context_tex_transfer_destroy(struct pipe_transfer *_transfer)
+identity_context_tex_transfer_destroy(struct pipe_context *_pipe,
+ struct pipe_transfer *_transfer)
{
- identity_transfer_destroy(identity_transfer(_transfer));
+ identity_transfer_destroy(identity_context(_pipe),
+ identity_transfer(_transfer));
}
static void *
#include "id_screen.h"
#include "id_objects.h"
+#include "id_context.h"
struct pipe_buffer *
identity_buffer_create(struct identity_screen *id_screen,
memcpy(&id_transfer->base, transfer, sizeof(struct pipe_transfer));
id_transfer->base.texture = NULL;
- pipe_texture_reference(&id_transfer->base.texture, &id_texture->base);
id_transfer->transfer = transfer;
+
+ pipe_texture_reference(&id_transfer->base.texture, &id_texture->base);
assert(id_transfer->base.texture == &id_texture->base);
return &id_transfer->base;
error:
- transfer->pipe->tex_transfer_destroy(transfer);
+ id_context->pipe->tex_transfer_destroy(id_context->pipe, transfer);
return NULL;
}
void
-identity_transfer_destroy(struct identity_transfer *id_transfer)
+identity_transfer_destroy(struct identity_context *id_context,
+ struct identity_transfer *id_transfer)
{
pipe_texture_reference(&id_transfer->base.texture, NULL);
- id_transfer->transfer->pipe->tex_transfer_destroy(id_transfer->transfer);
+ id_context->pipe->tex_transfer_destroy(id_context->pipe,
+ id_transfer->transfer);
FREE(id_transfer);
}
{
struct pipe_transfer base;
+ struct pipe_context *pipe;
struct pipe_transfer *transfer;
};
struct pipe_transfer *transfer);
void
-identity_transfer_destroy(struct identity_transfer *id_transfer);
+identity_transfer_destroy(struct identity_context *id_context,
+ struct identity_transfer *id_transfer);
struct pipe_video_surface *
identity_video_surface_create(struct identity_screen *id_screen,
pipe->transfer_unmap(pipe, scene->cbuf_transfer[i]);
if (scene->cbuf_transfer[i])
- pipe->tex_transfer_destroy(scene->cbuf_transfer[i]);
+ pipe->tex_transfer_destroy(pipe, scene->cbuf_transfer[i]);
scene->cbuf_transfer[i] = NULL;
scene->cbuf_map[i] = NULL;
pipe->transfer_unmap(pipe, scene->zsbuf_transfer);
if (scene->zsbuf_transfer)
- pipe->tex_transfer_destroy(scene->zsbuf_transfer);
+ pipe->tex_transfer_destroy(pipe, scene->zsbuf_transfer);
scene->zsbuf_transfer = NULL;
scene->zsbuf_map = NULL;
static void
-llvmpipe_tex_transfer_destroy(struct pipe_transfer *transfer)
+llvmpipe_tex_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
{
/* Effectively do the texture_update work here - if texture images
* needed post-processing to put them into hardware layout, this is
}
static void
-nv30_transfer_del(struct pipe_transfer *ptx)
+nv30_transfer_del(struct pipe_context *pcontext,
+ struct pipe_transfer *ptx)
{
struct nv30_transfer *tx = (struct nv30_transfer *)ptx;
if (!tx->direct && (ptx->usage & PIPE_TRANSFER_WRITE)) {
- struct pipe_screen *pscreen = ptx->texture->screen;
+ struct pipe_screen *pscreen = pcontext->screen;
struct nv30_screen *nvscreen = nv30_screen(pscreen);
struct pipe_surface *dst;
}
static void
-nv40_transfer_del(struct pipe_transfer *ptx)
+nv40_transfer_del(struct pipe_context *pcontext, struct pipe_transfer *ptx)
{
struct nv40_transfer *tx = (struct nv40_transfer *)ptx;
if (!tx->direct && (ptx->usage & PIPE_TRANSFER_WRITE)) {
- struct pipe_screen *pscreen = ptx->texture->screen;
+ struct pipe_screen *pscreen = pcontext->screen;
struct nv40_screen *nvscreen = nv40_screen(pscreen);
struct pipe_surface *dst;
}
static void
-nv50_transfer_del(struct pipe_transfer *ptx)
+nv50_transfer_del(struct pipe_context *pcontext, struct pipe_transfer *ptx)
{
struct nv50_transfer *tx = (struct nv50_transfer *)ptx;
struct nv50_miptree *mt = nv50_miptree(ptx->texture);
unsigned ny = util_format_get_nblocksy(pt->format, tx->base.height);
if (ptx->usage & PIPE_TRANSFER_WRITE) {
- struct pipe_screen *pscreen = pt->screen;
+ struct pipe_screen *pscreen = pcontext->screen;
nv50_transfer_rect_m2mf(pscreen, tx->bo, 0,
tx->base.stride, tx->bo->tile_mode,
return retval == usage;
}
-
-
static void r300_destroy_screen(struct pipe_screen* pscreen)
{
struct r300_screen* r300screen = r300_screen(pscreen);
return &trans->transfer;
}
-static void r300_tex_transfer_destroy(struct pipe_transfer *trans)
+static void r300_tex_transfer_destroy(struct pipe_context *ctx,
+ struct pipe_transfer *trans)
{
struct r300_transfer *r300transfer = r300_transfer(trans);
/*assert(tc->entries[pos].x < 0);*/
}
if (tc->transfer) {
- tc->pipe->tex_transfer_destroy(tc->transfer);
+ tc->pipe->tex_transfer_destroy(tc->pipe, tc->transfer);
}
if (tc->tex_trans) {
- tc->pipe->tex_transfer_destroy(tc->tex_trans);
+ tc->pipe->tex_transfer_destroy(tc->pipe, tc->tex_trans);
}
FREE( tc );
tc->tex_trans_map = NULL;
}
- tc->pipe->tex_transfer_destroy(tc->tex_trans);
+ tc->pipe->tex_transfer_destroy(tc->pipe, tc->tex_trans);
tc->tex_trans = NULL;
}
tc->tex_trans_map = NULL;
}
- tc->pipe->tex_transfer_destroy(tc->tex_trans);
+ tc->pipe->tex_transfer_destroy(tc->pipe, tc->tex_trans);
tc->tex_trans = NULL;
}
}
/* get tile from the transfer (view into texture) */
- pipe_get_tile_rgba(tc->tex_trans,
+ pipe_get_tile_rgba(tc->pipe,
+ tc->tex_trans,
addr.bits.x * TILE_SIZE,
addr.bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
struct pipe_transfer *pt = &spt->base;
int nblocksy = util_format_get_nblocksy(texture->format, u_minify(texture->height0, level));
pipe_texture_reference(&pt->texture, texture);
- pt->pipe = pipe;
pt->x = x;
pt->y = y;
pt->width = w;
* softpipe_get_tex_transfer().
*/
static void
-softpipe_tex_transfer_destroy(struct pipe_transfer *transfer)
+softpipe_tex_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
{
/* Effectively do the texture_update work here - if texture images
* needed post-processing to put them into hardware layout, this is
/*assert(tc->entries[pos].x < 0);*/
}
if (tc->transfer) {
- tc->pipe->tex_transfer_destroy(tc->transfer);
+ tc->pipe->tex_transfer_destroy(tc->pipe, tc->transfer);
}
FREE( tc );
tc->transfer_map = NULL;
}
- pipe->tex_transfer_destroy(tc->transfer);
+ pipe->tex_transfer_destroy(pipe, tc->transfer);
tc->transfer = NULL;
}
union tile_address addr = tile_address(x, y);
if (is_clear_flag_set(tc->clear_flags, addr)) {
- pipe_put_tile_raw(pt,
+ pipe_put_tile_raw(tc->pipe,
+ pt,
x, y, TILE_SIZE, TILE_SIZE,
tc->tile.data.color32, 0/*STRIDE*/);
struct softpipe_cached_tile *tile = tc->entries + pos;
if (!tile->addr.bits.invalid) {
if (tc->depth_stencil) {
- pipe_put_tile_raw(pt,
+ pipe_put_tile_raw(tc->pipe, pt,
tile->addr.bits.x * TILE_SIZE,
tile->addr.bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tile->data.depth32, 0/*STRIDE*/);
}
else {
- pipe_put_tile_rgba(pt,
+ pipe_put_tile_rgba(tc->pipe, pt,
tile->addr.bits.x * TILE_SIZE,
tile->addr.bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
if (tile->addr.bits.invalid == 0) {
/* put dirty tile back in framebuffer */
if (tc->depth_stencil) {
- pipe_put_tile_raw(pt,
+ pipe_put_tile_raw(tc->pipe, pt,
tile->addr.bits.x * TILE_SIZE,
tile->addr.bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tile->data.depth32, 0/*STRIDE*/);
}
else {
- pipe_put_tile_rgba(pt,
+ pipe_put_tile_rgba(tc->pipe, pt,
tile->addr.bits.x * TILE_SIZE,
tile->addr.bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
else {
/* get new tile data from transfer */
if (tc->depth_stencil) {
- pipe_get_tile_raw(pt,
+ pipe_get_tile_raw(tc->pipe, pt,
tile->addr.bits.x * TILE_SIZE,
tile->addr.bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tile->data.depth32, 0/*STRIDE*/);
}
else {
- pipe_get_tile_rgba(pt,
+ pipe_get_tile_rgba(tc->pipe, pt,
tile->addr.bits.x * TILE_SIZE,
tile->addr.bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
static void
-svga_tex_transfer_destroy(struct pipe_transfer *transfer)
+svga_tex_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
{
struct svga_texture *tex = svga_texture(transfer->texture);
- struct svga_screen *ss = svga_screen(transfer->texture->screen);
+ struct svga_screen *ss = svga_screen(pipe->screen);
struct svga_winsys_screen *sws = ss->sws;
struct svga_transfer *st = svga_transfer(transfer);
static void
-trace_context_tex_transfer_destroy(struct pipe_transfer *_transfer)
+trace_context_tex_transfer_destroy(struct pipe_context *_context,
+ struct pipe_transfer *_transfer)
{
- struct trace_context *tr_ctx = trace_context(_transfer->pipe);
+ struct trace_context *tr_context = trace_context(_context);
struct trace_transfer *tr_trans = trace_transfer(_transfer);
- struct pipe_context *context = tr_ctx->pipe;
+ struct pipe_context *context = tr_context->pipe;
struct pipe_transfer *transfer = tr_trans->transfer;
trace_dump_call_begin("pipe_context", "tex_transfer_destroy");
trace_dump_call_end();
- trace_transfer_destroy(tr_trans);
+ trace_transfer_destroy(tr_context, tr_trans);
}
NULL);
context->transfer_unmap(context, t);
- context->tex_transfer_destroy(t);
+ context->tex_transfer_destroy(context, t);
pipe_mutex_unlock(tr_scr->list_mutex);
memcpy(&tr_trans->base, transfer, sizeof(struct pipe_transfer));
- tr_trans->base.pipe = &tr_ctx->base;
tr_trans->base.texture = NULL;
- pipe_texture_reference(&tr_trans->base.texture, &tr_tex->base);
tr_trans->transfer = transfer;
+
+ pipe_texture_reference(&tr_trans->base.texture, &tr_tex->base);
assert(tr_trans->base.texture == &tr_tex->base);
trace_screen_add_to_list(tr_scr, transfers, tr_trans);
return &tr_trans->base;
error:
- tr_ctx->pipe->tex_transfer_destroy(transfer);
+ tr_ctx->pipe->tex_transfer_destroy(tr_ctx->pipe, transfer);
return NULL;
}
void
-trace_transfer_destroy(struct trace_transfer *tr_trans)
+trace_transfer_destroy(struct trace_context *tr_context,
+ struct trace_transfer *tr_trans)
{
- struct trace_screen *tr_scr = trace_screen(tr_trans->base.texture->screen);
- struct pipe_context *context = tr_trans->transfer->pipe;
+ struct trace_screen *tr_scr = trace_screen(tr_context->base.screen);
+ struct pipe_context *context = tr_context->pipe;
+ struct pipe_transfer *transfer = tr_trans->transfer;
trace_screen_remove_from_list(tr_scr, transfers, tr_trans);
pipe_texture_reference(&tr_trans->base.texture, NULL);
- context->tex_transfer_destroy(tr_trans->transfer);
+ context->tex_transfer_destroy(context, transfer);
FREE(tr_trans);
}
struct pipe_transfer base;
struct pipe_transfer *transfer;
+ struct pipe_context *pipe;
struct tr_list list;
struct pipe_transfer *transfer);
void
-trace_transfer_destroy(struct trace_transfer *tr_trans);
+trace_transfer_destroy(struct trace_context *tr_ctx,
+ struct trace_transfer *tr_trans);
#endif /* TR_TEXTURE_H_ */
unsigned x, unsigned y,
unsigned w, unsigned h);
- void (*tex_transfer_destroy)(struct pipe_transfer *);
+ void (*tex_transfer_destroy)(struct pipe_context *,
+ struct pipe_transfer *);
void *(*transfer_map)( struct pipe_context *,
struct pipe_transfer *transfer );
*/
struct pipe_transfer
{
- struct pipe_context *pipe;
-
unsigned x; /**< x offset from start of texture image */
unsigned y; /**< y offset from start of texture image */
unsigned width; /**< logical width in pixels */
void *map = pipe->transfer_map(pipe, transfer);
memcpy(map, color_data, sizeof(VGint)*color_data_len);
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
return tex;
#if 0
debug_printf("%d-%d == %d\n", sy, height, y);
#endif
- pipe_get_tile_rgba(transfer, sx, y, width, 1, df);
+ pipe_get_tile_rgba(pipe, transfer, sx, y, width, 1, df);
y += yStep;
_vega_pack_rgba_span_float(ctx, width, temp, dataFormat,
dst + yoffset + xoffset);
dst += dataStride;
}
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
}
src += (dataStride * yoffset);
for (i = 0; i < height; i++) {
_vega_unpack_float_span_rgba(ctx, width, xoffset, src, dataFormat, temp);
- pipe_put_tile_rgba(transfer, x+image->x, y+image->y, width, 1, df);
+ pipe_put_tile_rgba(pipe, transfer, x+image->x, y+image->y, width, 1, df);
y += yStep;
src += dataStride;
}
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
}
#if 0
debug_printf("%d-%d == %d\n", sy, height, y);
#endif
- pipe_get_tile_rgba(transfer, sx+image->x, y, width, 1, df);
+ pipe_get_tile_rgba(pipe, transfer, sx+image->x, y, width, 1, df);
y += yStep;
_vega_pack_rgba_span_float(ctx, width, temp, dataFormat, dst);
dst += dataStride;
}
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
}
void *map = pipe->transfer_map(pipe, transfer);
memcpy(map, p->gradient.color_data, sizeof(VGint)*1024);
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
return tex;
}
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
}
free(buf);
- pipe->tex_transfer_destroy(color_trans);
+ pipe->tex_transfer_destroy(pipe, color_trans);
}
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
}
free(buf);
- pipe->tex_transfer_destroy(color_trans);
+ pipe->tex_transfer_destroy(pipe, color_trans);
}
width, height);
if (usage & PIPE_TRANSFER_READ)
- pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
_mesa_problem(NULL, "unexpected format in st_clear_accum_buffer()");
}
- pipe_put_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_put_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
free(buf);
- pipe->tex_transfer_destroy(color_trans);
+ pipe->tex_transfer_destroy(pipe, color_trans);
}
/* Release transfer */
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
return pt;
}
cache->ymax = -1000000;
if (cache->trans) {
- pipe->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
cache->trans = NULL;
}
pipe->transfer_unmap(pipe, cache->trans);
cache->buffer = NULL;
- pipe->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
cache->trans = NULL;
}
if (cache) {
if (cache->trans) {
pipe->transfer_unmap(pipe, cache->trans);
- pipe->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
}
pipe_texture_reference(&st->bitmap.cache->texture, NULL);
free(st->bitmap.cache);
/* unmap */
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
assert(success);
/* unmap the stencil buffer */
pipe->transfer_unmap(pipe, pt);
- pipe->tex_transfer_destroy(pt);
+ pipe->tex_transfer_destroy(pipe, pt);
}
/* unmap the stencil buffer */
pipe->transfer_unmap(pipe, ptDraw);
- pipe->tex_transfer_destroy(ptDraw);
+ pipe->tex_transfer_destroy(pipe, ptDraw);
}
/* alternate path using get/put_tile() */
GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(ptRead, 0, 0, width, height, buf);
- pipe_put_tile_rgba(ptTex, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, ptRead, 0, 0, width, height, buf);
+ pipe_put_tile_rgba(pipe, ptTex, 0, 0, width, height, buf);
free(buf);
}
else {
/* GL_DEPTH */
GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint));
- pipe_get_tile_z(ptRead, 0, 0, width, height, buf);
- pipe_put_tile_z(ptTex, 0, 0, width, height, buf);
+ pipe_get_tile_z(pipe, ptRead, 0, 0, width, height, buf);
+ pipe_put_tile_z(pipe, ptTex, 0, 0, width, height, buf);
free(buf);
}
- pipe->tex_transfer_destroy(ptRead);
- pipe->tex_transfer_destroy(ptTex);
+ pipe->tex_transfer_destroy(pipe, ptRead);
+ pipe->tex_transfer_destroy(pipe, ptTex);
}
/* draw textured quad */
/* unmap the stencil buffer */
pipe->transfer_unmap(pipe, pt);
- pipe->tex_transfer_destroy(pt);
+ pipe->tex_transfer_destroy(pipe, pt);
}
map = pipe->transfer_map(pipe, trans);
if (!map) {
- pipe->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(pipe, trans);
return GL_FALSE;
}
}
pipe->transfer_unmap(pipe, trans);
- pipe->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(pipe, trans);
}
return GL_TRUE;
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / ((1 << 24) - 1);
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * (ztemp[j] & 0xffffff));
assert(format == GL_DEPTH_STENCIL_EXT);
for (i = 0; i < height; i++) {
GLuint *zshort = (GLuint *)dst;
- pipe_get_tile_raw(trans, 0, y, width, 1, dst, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, dst, 0);
y += yStep;
/* Reverse into 24/8 */
for (j = 0; j < width; j++) {
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / ((1 << 24) - 1);
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ((ztemp[j] >> 8) & 0xffffff));
/* XXX: unreachable code -- should be before st_read_stencil_pixels */
assert(format == GL_DEPTH_STENCIL_EXT);
for (i = 0; i < height; i++) {
- pipe_get_tile_raw(trans, 0, y, width, 1, dst, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, dst, 0);
y += yStep;
dst += dstStride;
}
GLushort ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / 0xffff;
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ztemp[j]);
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / 0xffffffff;
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ztemp[j]);
/* RGBA format */
/* Do a row at a time to flip image data vertically */
for (i = 0; i < height; i++) {
- pipe_get_tile_rgba(trans, 0, y, width, 1, df);
+ pipe_get_tile_rgba(pipe, trans, 0, y, width, 1, df);
y += yStep;
df += dfStride;
if (!dfStride) {
}
}
- pipe->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(pipe, trans);
_mesa_unmap_pbo_dest(ctx, &clippedPacking);
}
unpack); /* source data packing */
pipe->transfer_unmap(pipe, tex_xfer);
- pipe->tex_transfer_destroy(tex_xfer);
+ pipe->tex_transfer_destroy(pipe, tex_xfer);
/* copy / compress image */
util_blit_pixels_tex(ctx->st->blit,
debug_printf("%s: fallback format translation\n", __FUNCTION__);
/* get float[4] rgba row from surface */
- pipe_get_tile_rgba(tex_xfer, 0, row, width, 1, rgba);
+ pipe_get_tile_rgba(pipe, tex_xfer, 0, row, width, 1, rgba);
_mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format,
type, dest, &ctx->Pack, transferOps);
/* To avoid a large temp memory allocation, do copy row by row */
for (row = 0; row < height; row++, srcY += yStep) {
uint data[MAX_WIDTH];
- pipe_get_tile_z(src_trans, 0, srcY, width, 1, data);
+ pipe_get_tile_z(pipe, src_trans, 0, srcY, width, 1, data);
if (scaleOrBias) {
_mesa_scale_and_bias_depth_uint(ctx, width, data);
}
- pipe_put_tile_z(stImage->transfer, 0, row, width, 1, data);
+ pipe_put_tile_z(pipe, stImage->transfer, 0, row, width, 1, data);
}
}
else {
/* XXX this usually involves a lot of int/float conversion.
* try to avoid that someday.
*/
- pipe_get_tile_rgba(src_trans, 0, 0, width, height, tempSrc);
+ pipe_get_tile_rgba(pipe, src_trans, 0, 0, width, height, tempSrc);
/* Store into texture memory.
* Note that this does some special things such as pixel transfer
}
st_texture_image_unmap(ctx->st, stImage);
- pipe->tex_transfer_destroy(src_trans);
+ pipe->tex_transfer_destroy(pipe, src_trans);
}
pipe->transfer_unmap(pipe, srcTrans);
pipe->transfer_unmap(pipe, dstTrans);
- pipe->tex_transfer_destroy(srcTrans);
- pipe->tex_transfer_destroy(dstTrans);
+ pipe->tex_transfer_destroy(pipe, srcTrans);
+ pipe->tex_transfer_destroy(pipe, dstTrans);
}
}
pipe->transfer_unmap(pipe, stImage->transfer);
- pipe->tex_transfer_destroy(stImage->transfer);
+ pipe->tex_transfer_destroy(pipe, stImage->transfer);
}
u_minify(dst->width0, level),
u_minify(dst->height0, level)); /* width, height */
- pipe->tex_transfer_destroy(dst_transfer);
+ pipe->tex_transfer_destroy(pipe, dst_transfer);
srcUB += src_image_stride;
}