summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/util/u_draw.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2018-10-23 06:36:00 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2018-10-23 06:36:00 +0000
commitb65fcab046d3a1b6b6ac315720df220925c5322e (patch)
treeff73dcc383ac0799c655ff6194cda9dacb75dde9 /lib/mesa/src/gallium/auxiliary/util/u_draw.c
parent18d6381c51e253e4c41c62619f80d9ce745b95c8 (diff)
Merge Mesa 17.3.9
Mesa 18.x needs an ld with build-id for at least the intel code Mesa 18.2 assumes linux only memfd syscalls in intel code Tested by matthieu@, kettenis@ and myself on a variety of hardware and architectures. ok kettenis@
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/util/u_draw.c')
-rw-r--r--lib/mesa/src/gallium/auxiliary/util/u_draw.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/util/u_draw.c b/lib/mesa/src/gallium/auxiliary/util/u_draw.c
index b9f8fcd3c..a7590f7f0 100644
--- a/lib/mesa/src/gallium/auxiliary/util/u_draw.c
+++ b/lib/mesa/src/gallium/auxiliary/util/u_draw.c
@@ -62,13 +62,13 @@ util_draw_max_index(
const struct util_format_description *format_desc;
unsigned format_size;
- if (!buffer->buffer) {
+ if (buffer->is_user_buffer || !buffer->buffer.resource) {
continue;
}
- assert(buffer->buffer->height0 == 1);
- assert(buffer->buffer->depth0 == 1);
- buffer_size = buffer->buffer->width0;
+ assert(buffer->buffer.resource->height0 == 1);
+ assert(buffer->buffer.resource->depth0 == 1);
+ buffer_size = buffer->buffer.resource->width0;
format_desc = util_format_description(element->src_format);
assert(format_desc->block.width == 1);
@@ -136,7 +136,7 @@ util_draw_indirect(struct pipe_context *pipe,
struct pipe_draw_info info;
struct pipe_transfer *transfer;
uint32_t *params;
- const unsigned num_params = info_in->indexed ? 5 : 4;
+ const unsigned num_params = info_in->index_size ? 5 : 4;
assert(info_in->indirect);
assert(!info_in->count_from_stream_output);
@@ -145,8 +145,8 @@ util_draw_indirect(struct pipe_context *pipe,
params = (uint32_t *)
pipe_buffer_map_range(pipe,
- info_in->indirect,
- info_in->indirect_offset,
+ info_in->indirect->buffer,
+ info_in->indirect->offset,
num_params * sizeof(uint32_t),
PIPE_TRANSFER_READ,
&transfer);
@@ -158,8 +158,8 @@ util_draw_indirect(struct pipe_context *pipe,
info.count = params[0];
info.instance_count = params[1];
info.start = params[2];
- info.index_bias = info_in->indexed ? params[3] : 0;
- info.start_instance = info_in->indexed ? params[4] : params[3];
+ info.index_bias = info_in->index_size ? params[3] : 0;
+ info.start_instance = info_in->index_size ? params[4] : params[3];
info.indirect = NULL;
pipe_buffer_unmap(pipe, transfer);