mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
zink: export 8bit index buffer support based on extension presence
this is now handled by gallium, so the codepath can be dropped Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
This commit is contained in:
parent
09c28a35a5
commit
8ac4be916e
2 changed files with 10 additions and 12 deletions
|
|
@ -478,18 +478,13 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
unsigned index_offset = 0;
|
||||
struct pipe_resource *index_buffer = NULL;
|
||||
if (dinfo->index_size > 0) {
|
||||
if (!screen->info.have_EXT_index_type_uint8 && dinfo->index_size == 1) {
|
||||
util_translate_prim_restart_ib(pctx, dinfo, dindirect, &draws[0], &index_buffer);
|
||||
need_index_buffer_unref = true;
|
||||
} else {
|
||||
if (dinfo->has_user_indices) {
|
||||
if (!util_upload_index_buffer(pctx, dinfo, &draws[0], &index_buffer, &index_offset, 4)) {
|
||||
debug_printf("util_upload_index_buffer() failed\n");
|
||||
return;
|
||||
}
|
||||
} else
|
||||
index_buffer = dinfo->index.resource;
|
||||
}
|
||||
if (dinfo->has_user_indices) {
|
||||
if (!util_upload_index_buffer(pctx, dinfo, &draws[0], &index_buffer, &index_offset, 4)) {
|
||||
debug_printf("util_upload_index_buffer() failed\n");
|
||||
return;
|
||||
}
|
||||
} else
|
||||
index_buffer = dinfo->index.resource;
|
||||
}
|
||||
if (ctx->xfb_barrier)
|
||||
zink_emit_xfb_counter_barrier(ctx);
|
||||
|
|
|
|||
|
|
@ -849,6 +849,9 @@ zink_is_format_supported(struct pipe_screen *pscreen,
|
|||
vk_sample_count_flags(sample_count);
|
||||
|
||||
if (bind & PIPE_BIND_INDEX_BUFFER) {
|
||||
if (format == PIPE_FORMAT_R8_UINT &&
|
||||
!screen->info.have_EXT_index_type_uint8)
|
||||
return false;
|
||||
if (format != PIPE_FORMAT_R8_UINT &&
|
||||
format != PIPE_FORMAT_R16_UINT &&
|
||||
format != PIPE_FORMAT_R32_UINT)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue