nouveau/ws: handle 0inc inside nvk_push_val as well

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Karol Herbst
2022-06-11 14:48:45 +02:00
committed by Marge Bot
parent 1f8682a1e7
commit 05d969fc2e
+4 -1
View File
@@ -153,12 +153,15 @@ static inline void
nvk_push_val(struct nouveau_ws_push *push, uint32_t idx, uint32_t val)
{
UNUSED uint32_t last_hdr_val = *push->last_size;
UNUSED bool is_0inc = (last_hdr_val & 0xe0000000) == 0x60000000;
UNUSED bool is_1inc = (last_hdr_val & 0xe0000000) == 0xa0000000;
UNUSED bool is_immd = (last_hdr_val & 0xe0000000) == 0x80000000;
UNUSED uint16_t last_method = (last_hdr_val & 0x1fff) << 2;
uint16_t distance = push->map - push->last_size - 1;
if (is_1inc)
if (is_0inc)
distance = 0;
else if (is_1inc)
distance = MIN2(1, distance);
last_method += distance * 4;