hk: use common wg size

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
This commit is contained in:
Alyssa Rosenzweig 2024-11-19 14:38:21 -04:00 committed by Marge Bot
parent 7c921fa0d7
commit 7609a974a3
4 changed files with 5 additions and 17 deletions

View file

@ -795,8 +795,8 @@ hk_dispatch(struct hk_cmd_buffer *cmd, struct hk_cs *cs, struct hk_shader *s,
assert(s->info.stage == MESA_SHADER_COMPUTE);
struct hk_grid local_size =
hk_grid(s->info.cs.local_size[0], s->info.cs.local_size[1],
s->info.cs.local_size[2]);
hk_grid(s->b.info.workgroup_size[0], s->b.info.workgroup_size[1],
s->b.info.workgroup_size[2]);
if (!grid.indirect) {
grid.count[0] *= local_size.count[0];

View file

@ -182,9 +182,9 @@ dispatch(struct hk_cmd_buffer *cmd, struct hk_grid grid)
cmd, VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT);
if (stat) {
uint32_t local_size_threads = s->info.cs.local_size[0] *
s->info.cs.local_size[1] *
s->info.cs.local_size[2];
uint32_t local_size_threads = (uint32_t)s->b.info.workgroup_size[0] *
(uint32_t)s->b.info.workgroup_size[1] *
(uint32_t)s->b.info.workgroup_size[2];
struct libagx_cs_invocation_params p = {
.grid = cmd->state.cs.descriptors.root.cs.group_count_addr,

View file

@ -903,11 +903,6 @@ hk_compile_nir(struct hk_device *dev, const VkAllocationCallbacks *pAllocator,
shader->info.cull_distance_array_size = nir->info.cull_distance_array_size;
shader->b.info.outputs = outputs;
if (sw_stage == MESA_SHADER_COMPUTE) {
for (unsigned i = 0; i < 3; ++i)
shader->info.cs.local_size[i] = nir->info.workgroup_size[i];
}
if (xfb_info) {
assert(xfb_info->output_count < ARRAY_SIZE(shader->info.xfb_outputs));

View file

@ -75,13 +75,6 @@ struct hk_shader_info {
uint8_t _pad[7];
} vs;
struct {
/* Local workgroup size */
uint16_t local_size[3];
uint8_t _pad[26];
} cs;
struct {
struct agx_interp_info interp;
struct agx_fs_epilog_link_info epilog_key;