From 6bff596505dde64dee22da661c2641ffbc0bda59 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 22 Feb 2024 08:29:21 -0400 Subject: [PATCH] agx: add temp_like helper Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_compiler.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/asahi/compiler/agx_compiler.h b/src/asahi/compiler/agx_compiler.h index 4ec39735e7b..35bc0500300 100644 --- a/src/asahi/compiler/agx_compiler.h +++ b/src/asahi/compiler/agx_compiler.h @@ -513,6 +513,13 @@ agx_temp(agx_context *ctx, enum agx_size size) return agx_get_index(ctx->alloc++, size); } +static inline agx_index +agx_temp_like(agx_context *ctx, agx_index idx) +{ + idx.value = ctx->alloc++; + return idx; +} + static enum agx_size agx_size_for_bits(unsigned bits) {