mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 10:08:08 +02:00
vc4: export supported prim types by vc4
This is now handled by gallium. v2: Fix incorrect indentation (Alejandro Piñeiro) Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5277 Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12669>
This commit is contained in:
parent
cdb27abf58
commit
dad69c7ccd
2 changed files with 14 additions and 0 deletions
|
|
@ -204,6 +204,9 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_TEXRECT:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_SUPPORTED_PRIM_MODES:
|
||||
return screen->prim_types;
|
||||
|
||||
default:
|
||||
return u_pipe_screen_get_param_defaults(pscreen, param);
|
||||
}
|
||||
|
|
@ -606,6 +609,16 @@ vc4_screen_create(int fd, struct renderonly *ro)
|
|||
pscreen->get_driver_query_info = vc4_get_driver_query_info;
|
||||
}
|
||||
|
||||
/* Generate the bitmask of supported draw primitives. */
|
||||
screen->prim_types = BITFIELD_BIT(PIPE_PRIM_POINTS) |
|
||||
BITFIELD_BIT(PIPE_PRIM_LINES) |
|
||||
BITFIELD_BIT(PIPE_PRIM_LINE_LOOP) |
|
||||
BITFIELD_BIT(PIPE_PRIM_LINE_STRIP) |
|
||||
BITFIELD_BIT(PIPE_PRIM_TRIANGLES) |
|
||||
BITFIELD_BIT(PIPE_PRIM_TRIANGLE_STRIP) |
|
||||
BITFIELD_BIT(PIPE_PRIM_TRIANGLE_FAN);
|
||||
|
||||
|
||||
return pscreen;
|
||||
|
||||
fail:
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ struct vc4_screen {
|
|||
|
||||
uint32_t bo_size;
|
||||
uint32_t bo_count;
|
||||
uint32_t prim_types;
|
||||
bool has_control_flow;
|
||||
bool has_etc1;
|
||||
bool has_threaded_fs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue