|
|
@ -4297,9 +4297,9 @@ static void vrend_draw_bind_vertex_legacy(struct vrend_context *ctx, |
|
|
|
|
|
|
|
|
|
|
|
enable_bitmask |= (1 << loc); |
|
|
|
enable_bitmask |= (1 << loc); |
|
|
|
if (util_format_is_pure_integer(ve->base.src_format)) { |
|
|
|
if (util_format_is_pure_integer(ve->base.src_format)) { |
|
|
|
glVertexAttribIPointer(loc, size, ve->type, vbo->base.stride, (void *)(unsigned long)(ve->base.src_offset + vbo->base.buffer_offset)); |
|
|
|
glVertexAttribIPointer(loc, size, ve->type, vbo->base.stride, (void *)(uintptr_t)(ve->base.src_offset + vbo->base.buffer_offset)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
glVertexAttribPointer(loc, size, ve->type, ve->norm, vbo->base.stride, (void *)(unsigned long)(ve->base.src_offset + vbo->base.buffer_offset)); |
|
|
|
glVertexAttribPointer(loc, size, ve->type, ve->norm, vbo->base.stride, (void *)(uintptr_t)(ve->base.src_offset + vbo->base.buffer_offset)); |
|
|
|
} |
|
|
|
} |
|
|
|
glVertexAttribDivisorARB(loc, ve->base.instance_divisor); |
|
|
|
glVertexAttribDivisorARB(loc, ve->base.instance_divisor); |
|
|
|
} |
|
|
|
} |
|
|
@ -5073,12 +5073,12 @@ int vrend_draw_vbo(struct vrend_context *ctx, |
|
|
|
|
|
|
|
|
|
|
|
if (indirect_handle) { |
|
|
|
if (indirect_handle) { |
|
|
|
if (indirect_params_res) |
|
|
|
if (indirect_params_res) |
|
|
|
glMultiDrawArraysIndirectCountARB(mode, (GLvoid const *)(unsigned long)info->indirect.offset, |
|
|
|
glMultiDrawArraysIndirectCountARB(mode, (GLvoid const *)(uintptr_t)info->indirect.offset, |
|
|
|
info->indirect.indirect_draw_count_offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
info->indirect.indirect_draw_count_offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
else if (info->indirect.draw_count > 1) |
|
|
|
else if (info->indirect.draw_count > 1) |
|
|
|
glMultiDrawArraysIndirect(mode, (GLvoid const *)(unsigned long)info->indirect.offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
glMultiDrawArraysIndirect(mode, (GLvoid const *)(uintptr_t)info->indirect.offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
else |
|
|
|
else |
|
|
|
glDrawArraysIndirect(mode, (GLvoid const *)(unsigned long)info->indirect.offset); |
|
|
|
glDrawArraysIndirect(mode, (GLvoid const *)(uintptr_t)info->indirect.offset); |
|
|
|
} else if (info->instance_count > 0) { |
|
|
|
} else if (info->instance_count > 0) { |
|
|
|
if (info->start_instance > 0) |
|
|
|
if (info->start_instance > 0) |
|
|
|
glDrawArraysInstancedBaseInstance(mode, start, count, info->instance_count, info->start_instance); |
|
|
|
glDrawArraysInstancedBaseInstance(mode, start, count, info->instance_count, info->start_instance); |
|
|
@ -5104,31 +5104,31 @@ int vrend_draw_vbo(struct vrend_context *ctx, |
|
|
|
|
|
|
|
|
|
|
|
if (indirect_handle) { |
|
|
|
if (indirect_handle) { |
|
|
|
if (indirect_params_res) |
|
|
|
if (indirect_params_res) |
|
|
|
glMultiDrawElementsIndirectCountARB(mode, elsz, (GLvoid const *)(unsigned long)info->indirect.offset, |
|
|
|
glMultiDrawElementsIndirectCountARB(mode, elsz, (GLvoid const *)(uintptr_t)info->indirect.offset, |
|
|
|
info->indirect.indirect_draw_count_offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
info->indirect.indirect_draw_count_offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
else if (info->indirect.draw_count > 1) |
|
|
|
else if (info->indirect.draw_count > 1) |
|
|
|
glMultiDrawElementsIndirect(mode, elsz, (GLvoid const *)(unsigned long)info->indirect.offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
glMultiDrawElementsIndirect(mode, elsz, (GLvoid const *)(uintptr_t)info->indirect.offset, info->indirect.draw_count, info->indirect.stride); |
|
|
|
else |
|
|
|
else |
|
|
|
glDrawElementsIndirect(mode, elsz, (GLvoid const *)(unsigned long)info->indirect.offset); |
|
|
|
glDrawElementsIndirect(mode, elsz, (GLvoid const *)(uintptr_t)info->indirect.offset); |
|
|
|
} else if (info->index_bias) { |
|
|
|
} else if (info->index_bias) { |
|
|
|
if (info->instance_count > 0) { |
|
|
|
if (info->instance_count > 0) { |
|
|
|
if (info->start_instance > 0) |
|
|
|
if (info->start_instance > 0) |
|
|
|
glDrawElementsInstancedBaseVertexBaseInstance(mode, info->count, elsz, (void *)(unsigned long)sub_ctx->ib.offset, |
|
|
|
glDrawElementsInstancedBaseVertexBaseInstance(mode, info->count, elsz, (void *)(uintptr_t)sub_ctx->ib.offset, |
|
|
|
info->instance_count, info->index_bias, info->start_instance); |
|
|
|
info->instance_count, info->index_bias, info->start_instance); |
|
|
|
else |
|
|
|
else |
|
|
|
glDrawElementsInstancedBaseVertex(mode, info->count, elsz, (void *)(unsigned long)sub_ctx->ib.offset, info->instance_count, info->index_bias); |
|
|
|
glDrawElementsInstancedBaseVertex(mode, info->count, elsz, (void *)(uintptr_t)sub_ctx->ib.offset, info->instance_count, info->index_bias); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (info->min_index != 0 || info->max_index != (unsigned)-1) |
|
|
|
} else if (info->min_index != 0 || info->max_index != (unsigned)-1) |
|
|
|
glDrawRangeElementsBaseVertex(mode, info->min_index, info->max_index, info->count, elsz, (void *)(unsigned long)sub_ctx->ib.offset, info->index_bias); |
|
|
|
glDrawRangeElementsBaseVertex(mode, info->min_index, info->max_index, info->count, elsz, (void *)(uintptr_t)sub_ctx->ib.offset, info->index_bias); |
|
|
|
else |
|
|
|
else |
|
|
|
glDrawElementsBaseVertex(mode, info->count, elsz, (void *)(unsigned long)sub_ctx->ib.offset, info->index_bias); |
|
|
|
glDrawElementsBaseVertex(mode, info->count, elsz, (void *)(uintptr_t)sub_ctx->ib.offset, info->index_bias); |
|
|
|
} else if (info->instance_count > 1) { |
|
|
|
} else if (info->instance_count > 1) { |
|
|
|
glDrawElementsInstancedARB(mode, info->count, elsz, (void *)(unsigned long)sub_ctx->ib.offset, info->instance_count); |
|
|
|
glDrawElementsInstancedARB(mode, info->count, elsz, (void *)(uintptr_t)sub_ctx->ib.offset, info->instance_count); |
|
|
|
} else if (info->min_index != 0 || info->max_index != (unsigned)-1) |
|
|
|
} else if (info->min_index != 0 || info->max_index != (unsigned)-1) |
|
|
|
glDrawRangeElements(mode, info->min_index, info->max_index, info->count, elsz, (void *)(unsigned long)sub_ctx->ib.offset); |
|
|
|
glDrawRangeElements(mode, info->min_index, info->max_index, info->count, elsz, (void *)(uintptr_t)sub_ctx->ib.offset); |
|
|
|
else |
|
|
|
else |
|
|
|
glDrawElements(mode, info->count, elsz, (void *)(unsigned long)sub_ctx->ib.offset); |
|
|
|
glDrawElements(mode, info->count, elsz, (void *)(uintptr_t)sub_ctx->ib.offset); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (info->primitive_restart) { |
|
|
|
if (info->primitive_restart) { |
|
|
|