nouveau/push: Add a P_INLINE_FLOAT helper

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:11:51 -06:00 committed by Marge Bot
parent 5e3f6f326f
commit dc1f87864d

View file

@ -165,6 +165,16 @@ P_INLINE_DATA(struct nouveau_ws_push *push, uint32_t value)
}
}
static inline void
P_INLINE_FLOAT(struct nouveau_ws_push *push, float value)
{
if (nvk_push_update_count(push, 1)) {
/* push new value */
*(float *)push->map = value;
push->map++;
}
}
static inline void
P_INLINE_ARRAY(struct nouveau_ws_push *push, const uint32_t *data, int num_dw)
{