aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2020-05-27 13:42:22 -0700
committerMarge Bot <[email protected]>2020-06-03 23:12:22 +0000
commitae88e79f6959df71953db6314c78f68bd2799f3c (patch)
tree0a4e36412b86355865a0ccd64555ca785286b953 /src
parenteb5d1c27227302167d299bcaa2dabe623a242eb3 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_genx_macros.h5
-rw-r--r--src/gallium/drivers/iris/iris_query.c1
-rw-r--r--src/gallium/drivers/iris/iris_screen.h3
3 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/iris/iris_genx_macros.h b/src/gallium/drivers/iris/iris_genx_macros.h
index 9312175d9b1..f0e6df064ba 100644
--- a/src/gallium/drivers/iris/iris_genx_macros.h
+++ b/src/gallium/drivers/iris/iris_genx_macros.h
@@ -52,7 +52,8 @@ __gen_combine_address(struct iris_batch *batch, void *location,
uint64_t result = addr.offset + delta;
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. */
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)
{
return (struct iris_address) { .bo = bo, .offset = offset,
- .write = true, .access = access };
+ .access = access };
}
diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c
index 7f93d0f7ec7..ef46158e95d 100644
--- a/src/gallium/drivers/iris/iris_query.c
+++ b/src/gallium/drivers/iris/iris_query.c
@@ -101,7 +101,6 @@ query_mem64(struct iris_query *q, uint32_t offset)
struct iris_address addr = {
.bo = iris_resource_bo(q->query_state_ref.res),
.offset = q->query_state_ref.offset + offset,
- .write = true,
.access = IRIS_DOMAIN_OTHER_WRITE
};
return gen_mi_mem64(addr);
diff --git a/src/gallium/drivers/iris/iris_screen.h b/src/gallium/drivers/iris/iris_screen.h
index 4d300e302e9..b11178bc5be 100644
--- a/src/gallium/drivers/iris/iris_screen.h
+++ b/src/gallium/drivers/iris/iris_screen.h
@@ -137,10 +137,9 @@ struct iris_vtable {
};
struct iris_address {
- enum iris_domain access;
struct iris_bo *bo;
uint64_t offset;
- bool write;
+ enum iris_domain access;
};
struct iris_screen {