intel/mi_builder: Return an address from __gen_get_batch_address
While we're here, add __gen_get_batch_address declarations to more files because we're about to start requiring it on all GFX 12.5+. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445>
This commit is contained in:
parent
322fba216b
commit
8525ebe6e3
|
@ -61,6 +61,12 @@ __gen_combine_address(struct iris_batch *batch, void *location,
|
|||
return result;
|
||||
}
|
||||
|
||||
static inline struct iris_address
|
||||
__gen_get_batch_address(struct iris_batch *batch, void *location)
|
||||
{
|
||||
unreachable("Not supported by iris");
|
||||
}
|
||||
|
||||
#define __gen_address_type struct iris_address
|
||||
#define __gen_user_data struct iris_batch
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
* required. The following function must also be defined, it returns an
|
||||
* address in canonical form:
|
||||
*
|
||||
* uint64_t
|
||||
* __gen_address_type
|
||||
* __gen_get_batch_address(__gen_user_data *user_data, void *location);
|
||||
*
|
||||
* Also, __gen_combine_address must accept a location value of NULL and return
|
||||
|
@ -1172,8 +1172,9 @@ _mi_resolve_address_token(struct mi_builder *b,
|
|||
struct mi_address_token token,
|
||||
void *batch_location)
|
||||
{
|
||||
uint64_t addr_addr_u64 = __gen_get_batch_address(b->user_data,
|
||||
__gen_address_type addr = __gen_get_batch_address(b->user_data,
|
||||
batch_location);
|
||||
uint64_t addr_addr_u64 = __gen_combine_address(b->user_data, NULL, addr, 0);
|
||||
*(token.ptrs[0]) = addr_addr_u64;
|
||||
*(token.ptrs[1]) = addr_addr_u64 + 4;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#define MI_BUILDER_NUM_ALLOC_GPRS 14
|
||||
#define __gen_get_batch_dwords anv_batch_emit_dwords
|
||||
#define __gen_address_offset anv_address_add
|
||||
#define __gen_get_batch_address(b, a) anv_batch_address(b, a)
|
||||
#include "common/mi_builder.h"
|
||||
|
||||
static void genX(flush_pipeline_select)(struct anv_cmd_buffer *cmd_buffer,
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#define MI_BUILDER_CAN_WRITE_BATCH GEN_GEN >= 8
|
||||
#define __gen_get_batch_dwords anv_batch_emit_dwords
|
||||
#define __gen_address_offset anv_address_add
|
||||
#define __gen_get_batch_address(b, a) anv_address_physical(anv_batch_address(b, a))
|
||||
#define __gen_get_batch_address(b, a) anv_batch_address(b, a)
|
||||
#include "common/mi_builder.h"
|
||||
#include "perf/gen_perf.h"
|
||||
#include "perf/gen_perf_mdapi.h"
|
||||
|
|
Loading…
Reference in New Issue