zink: add a bits union for zink_render_pass_state comparisons

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640>
This commit is contained in:
Mike Blumenkrantz 2022-07-15 17:11:49 -04:00 committed by Marge Bot
parent 13951385b3
commit f78919d36d
1 changed files with 10 additions and 5 deletions

View File

@ -48,11 +48,16 @@ struct zink_rt_attrib {
};
struct zink_render_pass_state {
uint8_t num_cbufs : 5; /* PIPE_MAX_COLOR_BUFS = 8 */
uint8_t have_zsbuf : 1;
uint8_t samples:1; //for fs samplemask
uint32_t num_zsresolves : 1;
uint32_t num_cresolves : 24; /* PIPE_MAX_COLOR_BUFS, but this is a struct hole */
union {
struct {
uint8_t num_cbufs : 5; /* PIPE_MAX_COLOR_BUFS = 8 */
uint8_t have_zsbuf : 1;
uint8_t samples:1; //for fs samplemask
uint32_t num_zsresolves : 1;
uint32_t num_cresolves : 24; /* PIPE_MAX_COLOR_BUFS, but this is a struct hole */
};
uint32_t val; //for comparison
};
struct zink_rt_attrib rts[PIPE_MAX_COLOR_BUFS + 1];
unsigned num_rts;
uint32_t clears; //for extra verification and update flagging