isaspec: Make possible to obtain gpu_id in <expr> blocks
Done with ISA_GPU_ID() macro. This makes possible to use gpu generation in to select between overrides. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>
This commit is contained in:
committed by
Marge Bot
parent
7e10a175c7
commit
d0ab1a6217
@@ -391,6 +391,11 @@ store_instruction(BITSET_WORD *dst, bitmask_t instr)
|
||||
*/
|
||||
struct encode_state;
|
||||
|
||||
/**
|
||||
* Allows to use gpu_id in expr functions
|
||||
*/
|
||||
#define ISA_GPU_ID() s->gen
|
||||
|
||||
struct bitset_params;
|
||||
|
||||
static bitmask_t
|
||||
|
||||
@@ -61,6 +61,12 @@ void isa_decode_bitset(void *out, const struct isa_bitset **bitsets, struct deco
|
||||
/**
|
||||
* Used by generated decode functions
|
||||
*/
|
||||
uint32_t isa_get_gpu_id(struct decode_scope *scope);
|
||||
|
||||
/**
|
||||
* Allows to use gpu_id in expr functions
|
||||
*/
|
||||
#define ISA_GPU_ID() isa_get_gpu_id(scope)
|
||||
|
||||
/**
|
||||
* For bitset fields, there are some cases where we want to "remap" field
|
||||
|
||||
@@ -557,6 +557,12 @@ isa_decode_field(struct decode_scope *scope, const char *field_name)
|
||||
return bitmask_to_uint64_t(val);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
isa_get_gpu_id(struct decode_scope *scope)
|
||||
{
|
||||
return scope->state->options->gpu_id;
|
||||
}
|
||||
|
||||
static void
|
||||
display_field(struct decode_scope *scope, const char *field_name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user