mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +01:00
hk: optimize out empty dispatches
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638>
This commit is contained in:
parent
f6ee36a437
commit
b916c38c76
2 changed files with 6 additions and 0 deletions
|
|
@ -793,6 +793,9 @@ hk_dispatch_with_local_size(struct hk_cmd_buffer *cmd, struct hk_cs *cs,
|
||||||
struct hk_shader *s, struct agx_grid grid,
|
struct hk_shader *s, struct agx_grid grid,
|
||||||
struct agx_workgroup local_size)
|
struct agx_workgroup local_size)
|
||||||
{
|
{
|
||||||
|
if (agx_is_shader_empty(&s->b))
|
||||||
|
return;
|
||||||
|
|
||||||
struct hk_device *dev = hk_cmd_buffer_device(cmd);
|
struct hk_device *dev = hk_cmd_buffer_device(cmd);
|
||||||
uint32_t usc = hk_upload_usc_words(cmd, s, s->only_linked);
|
uint32_t usc = hk_upload_usc_words(cmd, s, s->only_linked);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,9 @@ static void
|
||||||
dispatch(struct hk_cmd_buffer *cmd, struct agx_grid grid)
|
dispatch(struct hk_cmd_buffer *cmd, struct agx_grid grid)
|
||||||
{
|
{
|
||||||
struct hk_shader *s = hk_only_variant(cmd->state.cs.shader);
|
struct hk_shader *s = hk_only_variant(cmd->state.cs.shader);
|
||||||
|
if (agx_is_shader_empty(&s->b))
|
||||||
|
return;
|
||||||
|
|
||||||
struct hk_cs *cs = hk_cmd_buffer_get_cs(cmd, true /* compute */);
|
struct hk_cs *cs = hk_cmd_buffer_get_cs(cmd, true /* compute */);
|
||||||
if (!cs)
|
if (!cs)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue