summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-06-26 23:33:40 -0700
committerKenneth Graunke <[email protected]>2019-06-27 08:12:22 -0700
commit16d334951e7302a40c2d7814a5f8aae32ec5732c (patch)
treed8d9ab0674e3a045f9c10c18b64ca9f07fd44d9b /src/gallium/drivers
parent8f51f1ba6e70a7ad7027b58e4f67fe1c6e523012 (diff)
iris: Only bother with thread ID upload if doing MEDIA_CURBE_LOAD
We were unconditionally uploading the new data, but then conditionally using it with MEDIA_CURBE_LOAD. If we're not going to emit the command, there's no point in uploading the data.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_state.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index df7f2da9336..385d99bdb4f 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -5502,20 +5502,20 @@ iris_upload_compute_state(struct iris_context *ice,
}
/* TODO: Combine subgroup-id with cbuf0 so we can push regular uniforms */
- uint32_t curbe_data_offset = 0;
- assert(cs_prog_data->push.cross_thread.dwords == 0 &&
- cs_prog_data->push.per_thread.dwords == 1 &&
- cs_prog_data->base.param[0] == BRW_PARAM_BUILTIN_SUBGROUP_ID);
- struct pipe_resource *curbe_data_res = NULL;
- uint32_t *curbe_data_map =
- stream_state(batch, ice->state.dynamic_uploader, &curbe_data_res,
- ALIGN(cs_prog_data->push.total.size, 64), 64,
- &curbe_data_offset);
- assert(curbe_data_map);
- memset(curbe_data_map, 0x5a, ALIGN(cs_prog_data->push.total.size, 64));
- iris_fill_cs_push_const_buffer(cs_prog_data, curbe_data_map);
-
if (dirty & IRIS_DIRTY_CS) {
+ uint32_t curbe_data_offset = 0;
+ assert(cs_prog_data->push.cross_thread.dwords == 0 &&
+ cs_prog_data->push.per_thread.dwords == 1 &&
+ cs_prog_data->base.param[0] == BRW_PARAM_BUILTIN_SUBGROUP_ID);
+ struct pipe_resource *curbe_data_res = NULL;
+ uint32_t *curbe_data_map =
+ stream_state(batch, ice->state.dynamic_uploader, &curbe_data_res,
+ ALIGN(cs_prog_data->push.total.size, 64), 64,
+ &curbe_data_offset);
+ assert(curbe_data_map);
+ memset(curbe_data_map, 0x5a, ALIGN(cs_prog_data->push.total.size, 64));
+ iris_fill_cs_push_const_buffer(cs_prog_data, curbe_data_map);
+
iris_emit_cmd(batch, GENX(MEDIA_CURBE_LOAD), curbe) {
curbe.CURBETotalDataLength =
ALIGN(cs_prog_data->push.total.size, 64);