summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c9
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c6
2 files changed, 6 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 1a8aea3c198..2d4c82148c8 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -196,12 +196,9 @@ st_bufferobj_data(struct gl_context *ctx,
* This should be the same as creating a new buffer, but we avoid
* a lot of validation in Mesa.
*/
- struct pipe_box box;
-
- u_box_1d(0, size, &box);
- pipe->transfer_inline_write(pipe, st_obj->buffer, 0,
- PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE,
- &box, data, 0, 0);
+ pipe->buffer_subdata(pipe, st_obj->buffer,
+ PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE,
+ 0, size, data);
return GL_TRUE;
} else if (screen->get_param(screen, PIPE_CAP_INVALIDATE_BUFFER)) {
pipe->invalidate_resource(pipe, st_obj->buffer);
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index a76775f6ded..d2acc71b81c 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1339,7 +1339,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
if (!dst)
goto fallback;
- /* Try transfer_inline_write, which should be the fastest memcpy path. */
+ /* Try texture_subdata, which should be the fastest memcpy path. */
if (pixels &&
!_mesa_is_bufferobj(unpack->BufferObj) &&
_mesa_texstore_can_use_memcpy(ctx, texImage->_BaseFormat,
@@ -1365,8 +1365,8 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
}
u_box_3d(xoffset, yoffset, zoffset + dstz, width, height, depth, &box);
- pipe->transfer_inline_write(pipe, dst, dst_level, 0,
- &box, data, stride, layer_stride);
+ pipe->texture_subdata(pipe, dst, dst_level, 0,
+ &box, data, stride, layer_stride);
return;
}