mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
iris: Drop redundant iris_address::write flag.
The write flag is redundant since it can be inferred easily from the iris_address::access domain. This allows the iris_address struct to be laid out more efficiently in memory, leading to a measurable improvement in several Piglit Drawoverhead test-cases. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>
This commit is contained in:
parent
eb5d1c2722
commit
ae88e79f69
3 changed files with 4 additions and 5 deletions
|
|
@ -52,7 +52,8 @@ __gen_combine_address(struct iris_batch *batch, void *location,
|
||||||
uint64_t result = addr.offset + delta;
|
uint64_t result = addr.offset + delta;
|
||||||
|
|
||||||
if (addr.bo) {
|
if (addr.bo) {
|
||||||
iris_use_pinned_bo(batch, addr.bo, addr.write, addr.access);
|
iris_use_pinned_bo(batch, addr.bo,
|
||||||
|
!iris_domain_is_read_only(addr.access), addr.access);
|
||||||
/* Assume this is a general address, not relative to a base. */
|
/* Assume this is a general address, not relative to a base. */
|
||||||
result += addr.bo->gtt_offset;
|
result += addr.bo->gtt_offset;
|
||||||
}
|
}
|
||||||
|
|
@ -129,5 +130,5 @@ UNUSED static struct iris_address
|
||||||
rw_bo(struct iris_bo *bo, uint64_t offset, enum iris_domain access)
|
rw_bo(struct iris_bo *bo, uint64_t offset, enum iris_domain access)
|
||||||
{
|
{
|
||||||
return (struct iris_address) { .bo = bo, .offset = offset,
|
return (struct iris_address) { .bo = bo, .offset = offset,
|
||||||
.write = true, .access = access };
|
.access = access };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ query_mem64(struct iris_query *q, uint32_t offset)
|
||||||
struct iris_address addr = {
|
struct iris_address addr = {
|
||||||
.bo = iris_resource_bo(q->query_state_ref.res),
|
.bo = iris_resource_bo(q->query_state_ref.res),
|
||||||
.offset = q->query_state_ref.offset + offset,
|
.offset = q->query_state_ref.offset + offset,
|
||||||
.write = true,
|
|
||||||
.access = IRIS_DOMAIN_OTHER_WRITE
|
.access = IRIS_DOMAIN_OTHER_WRITE
|
||||||
};
|
};
|
||||||
return gen_mi_mem64(addr);
|
return gen_mi_mem64(addr);
|
||||||
|
|
|
||||||
|
|
@ -137,10 +137,9 @@ struct iris_vtable {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iris_address {
|
struct iris_address {
|
||||||
enum iris_domain access;
|
|
||||||
struct iris_bo *bo;
|
struct iris_bo *bo;
|
||||||
uint64_t offset;
|
uint64_t offset;
|
||||||
bool write;
|
enum iris_domain access;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iris_screen {
|
struct iris_screen {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue