Mesa (main): iris: Set BindingTableEntryCount for compute shaders
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 12 00:03:49 UTC 2022
Module: Mesa
Branch: main
Commit: 62f0677223171819f04a288c8b17911aa6485b4a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=62f0677223171819f04a288c8b17911aa6485b4a
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Tue Apr 5 16:42:55 2022 -0500
iris: Set BindingTableEntryCount for compute shaders
This may slightly increase perf somewhere because the hardware can now
pre-cache binding tables. The real feature is that INTEL_DEBUG=bat now
dumps out surface states for compute.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15759>
---
src/gallium/drivers/iris/iris_state.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 1c184d2f44b..7535c646c2a 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -4722,6 +4722,7 @@ iris_store_cs_state(const struct intel_device_info *devinfo,
assert(cs_prog_data->push.cross_thread.regs == 0);
#endif
desc.BarrierEnable = cs_prog_data->uses_barrier;
+ desc.BindingTableEntryCount = MIN2(shader->bt.size_bytes / 4, 31);
#if GFX_VER >= 12
/* TODO: Check if we are missing workarounds and enable mid-thread
* preemption.
@@ -7153,6 +7154,7 @@ iris_upload_compute_walker(struct iris_context *ice,
.NumberOfBarriers = cs_prog_data->uses_barrier,
.SamplerStatePointer = shs->sampler_table.offset,
.BindingTablePointer = binder->bt_offset[MESA_SHADER_COMPUTE],
+ .BindingTableEntryCount = MIN2(shader->bt.size_bytes / 4, 31),
};
assert(brw_cs_push_const_total_size(cs_prog_data, dispatch.threads) == 0);
More information about the mesa-commit
mailing list