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. 17
      src/vrend_renderer.c

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

Loading…
Cancel
Save