mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 06:40:24 +01:00
st/mesa: simplify some st_context(ctx)->pipe code
This commit is contained in:
parent
bf14ab417c
commit
3e06803c2c
6 changed files with 9 additions and 10 deletions
|
|
@ -121,7 +121,7 @@ load_color_map_texture(struct gl_context *ctx, struct pipe_resource *pt)
|
|||
uint *dest;
|
||||
uint i, j;
|
||||
|
||||
transfer = pipe_get_transfer(st_context(ctx)->pipe,
|
||||
transfer = pipe_get_transfer(pipe,
|
||||
pt, 0, 0, PIPE_TRANSFER_WRITE,
|
||||
0, 0, texSize, texSize);
|
||||
dest = (uint *) pipe_transfer_map(pipe, transfer);
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ accum_return(struct gl_context *ctx, GLfloat value,
|
|||
else
|
||||
usage = PIPE_TRANSFER_WRITE;
|
||||
|
||||
color_trans = pipe_get_transfer(st_context(ctx)->pipe,
|
||||
color_trans = pipe_get_transfer(pipe,
|
||||
color_strb->texture, 0, 0,
|
||||
usage,
|
||||
xpos, ypos,
|
||||
|
|
|
|||
|
|
@ -222,8 +222,7 @@ st_bufferobj_data(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
if (data)
|
||||
pipe_buffer_write(st_context(ctx)->pipe, st_obj->buffer, 0,
|
||||
size, data);
|
||||
pipe_buffer_write(pipe, st_obj->buffer, 0, size, data);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
|
|||
else
|
||||
usage = PIPE_TRANSFER_WRITE;
|
||||
|
||||
pt = pipe_get_transfer(st_context(ctx)->pipe, strb->texture,
|
||||
pt = pipe_get_transfer(pipe, strb->texture,
|
||||
strb->rtt_level, strb->rtt_face + strb->rtt_slice,
|
||||
usage, x, y,
|
||||
width, height);
|
||||
|
|
@ -1131,7 +1131,7 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
|
|||
dsty = rbDraw->Base.Height - dsty - height;
|
||||
}
|
||||
|
||||
ptDraw = pipe_get_transfer(st_context(ctx)->pipe,
|
||||
ptDraw = pipe_get_transfer(pipe,
|
||||
rbDraw->texture,
|
||||
rbDraw->rtt_level,
|
||||
rbDraw->rtt_face + rbDraw->rtt_slice,
|
||||
|
|
|
|||
|
|
@ -807,7 +807,7 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
|
|||
PIPE_TEX_MIPFILTER_NEAREST);
|
||||
|
||||
/* map the dst_surface so we can read from it */
|
||||
tex_xfer = pipe_get_transfer(st_context(ctx)->pipe,
|
||||
tex_xfer = pipe_get_transfer(pipe,
|
||||
dst_texture, 0, 0,
|
||||
PIPE_TRANSFER_READ,
|
||||
0, 0, width, height);
|
||||
|
|
@ -1228,7 +1228,7 @@ fallback_copy_texsubimage(struct gl_context *ctx, GLenum target, GLint level,
|
|||
srcY = strb->Base.Height - srcY - height;
|
||||
}
|
||||
|
||||
src_trans = pipe_get_transfer(st_context(ctx)->pipe,
|
||||
src_trans = pipe_get_transfer(pipe,
|
||||
strb->texture,
|
||||
0, 0,
|
||||
PIPE_TRANSFER_READ,
|
||||
|
|
|
|||
|
|
@ -229,12 +229,12 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
|
|||
ubyte *dstData;
|
||||
int srcStride, dstStride;
|
||||
|
||||
srcTrans = pipe_get_transfer(st_context(ctx)->pipe, pt, srcLevel,
|
||||
srcTrans = pipe_get_transfer(pipe, pt, srcLevel,
|
||||
face,
|
||||
PIPE_TRANSFER_READ, 0, 0,
|
||||
srcWidth, srcHeight);
|
||||
|
||||
dstTrans = pipe_get_transfer(st_context(ctx)->pipe, pt, dstLevel,
|
||||
dstTrans = pipe_get_transfer(pipe, pt, dstLevel,
|
||||
face,
|
||||
PIPE_TRANSFER_WRITE, 0, 0,
|
||||
dstWidth, dstHeight);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue