vrend_renderer.c: remove use_sub_data

It's never set to 1.

Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gurchetan Singh 6 years ago committed by Jakob Bornecrantz
parent 9b91cc380f
commit 43811855be
  1. 5
      src/vrend_renderer.c

@ -5847,7 +5847,6 @@ void vrend_renderer_resource_unref(uint32_t res_handle)
vrend_resource_remove(res->handle);
}
static int use_sub_data = 0;
struct virgl_sub_upload_data {
GLenum target;
struct pipe_box *box;
@ -6075,9 +6074,6 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx,
d.target = res->target;
glBindBufferARB(res->target, res->id);
if (use_sub_data == 1) {
vrend_read_from_iovec_cb(iov, num_iovs, info->offset, info->box->width, &iov_buffer_upload, &d);
} else {
data = glMapBufferRange(res->target, info->box->x, info->box->width, GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_WRITE_BIT);
if (data == NULL) {
fprintf(stderr,"map failed for element buffer\n");
@ -6086,7 +6082,6 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx,
vrend_read_from_iovec(iov, num_iovs, info->offset, data, info->box->width);
glUnmapBuffer(res->target);
}
}
} else {
GLenum glformat;
GLenum gltype;

Loading…
Cancel
Save