asahi: Add blend constant system value

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>
This commit is contained in:
Alyssa Rosenzweig 2021-05-04 22:33:35 -04:00
parent 30d1223247
commit d76ab2b5d6
2 changed files with 9 additions and 0 deletions

View file

@ -43,6 +43,9 @@ enum agx_push_type {
/* Push the content of a UBO */
AGX_PUSH_UBO_DATA = 7,
/* RGBA blend constant (FP32) */
AGX_PUSH_BLEND_CONST = 8,
/* Keep last */
AGX_PUSH_NUM_TYPES
};

View file

@ -84,6 +84,12 @@ agx_push_location_direct(struct agx_context *ctx, struct agx_push push,
return ptr.gpu;
}
case AGX_PUSH_BLEND_CONST:
{
return agx_pool_upload_aligned(&batch->pool, &ctx->blend_color,
sizeof(ctx->blend_color), 8);
}
default:
unreachable("todo: push more");
}