mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
panfrost: Add tristate_is_defined helper
This is useful to ensure that the tri-state has been set. It could be inlined, but the tri-state structure is designed to be opaque so this matches better. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17068>
This commit is contained in:
parent
950d27f9bf
commit
9cdd32257f
1 changed files with 10 additions and 0 deletions
|
|
@ -79,6 +79,16 @@ pan_tristate_get(struct pan_tristate state)
|
|||
return (state.v == PAN_TRISTATE_TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether a tristate has a defined value (not PAN_TRISTATE_DONTCARE). If
|
||||
* true, pan_tristate_get will return a defined value.
|
||||
*/
|
||||
static inline bool
|
||||
pan_tristate_is_defined(struct pan_tristate state)
|
||||
{
|
||||
return (state.v != PAN_TRISTATE_DONTCARE);
|
||||
}
|
||||
|
||||
/* A panfrost_batch corresponds to a bound FBO we're rendering to,
|
||||
* collecting over multiple draws. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue