iris: Re-emit MEDIA_VFE_STATE for variable group size shaders
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 5 May 2021 01:24:54 +0000 (20:24 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 16 Jul 2021 11:02:50 +0000 (11:02 +0000)
It implicitly contains the number of threads via the CURBE allocation
size field.

Fixes: 33c61eb2f105 "iris: Implement ARB_compute_variable_group_size"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10640>

src/gallium/drivers/iris/iris_state.c

index 067e536..2f0831a 100644 (file)
@@ -6878,7 +6878,8 @@ iris_upload_gpgpu_walker(struct iris_context *ice,
    const struct brw_cs_dispatch_info dispatch =
       brw_cs_get_dispatch_info(devinfo, cs_prog_data, grid->block);
 
-   if (stage_dirty & IRIS_STAGE_DIRTY_CS) {
+   if ((stage_dirty & IRIS_STAGE_DIRTY_CS) ||
+       cs_prog_data->local_size[0] == 0 /* Variable local group size */) {
       /* The MEDIA_VFE_STATE documentation for Gfx8+ says:
        *
        *   "A stalling PIPE_CONTROL is required before MEDIA_VFE_STATE unless