[Mesa-dev] [PATCH 1/3] anv: device: calculate compute thread numbers using subslices numbers

Kenneth Graunke kenneth at whitecape.org
Tue Sep 20 23:48:01 UTC 2016


On Friday, September 9, 2016 11:45:07 AM PDT Lionel Landwerlin wrote:
[snip]
> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
> index 99b3acf..aa9be69 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -569,6 +569,20 @@ struct anv_physical_device {
>      struct isl_device                           isl_dev;
>      int                                         cmd_parser_version;
>  
> +    uint32_t                                    eu_total;
> +    uint32_t                                    subslice_total;
> +
> +    /**
> +     * Platform specific constants containing the maximum number of threads
> +     * for each pipeline stage.
> +     */
> +    uint32_t                                    max_vs_threads;
> +    uint32_t                                    max_hs_threads;
> +    uint32_t                                    max_ds_threads;
> +    uint32_t                                    max_gs_threads;
> +    uint32_t                                    max_wm_threads;
> +    uint32_t                                    max_cs_threads;
> +

One idea we've had for a while is to make a gen_device_info struct
which is mutable, and initialize it from the static const ones we
currently have.  But, then mutate the max_*_threads and other fields.

In GL, we've got a couple bugs on Cherryview currently because we
have two copies of it, and some places use brw->* (the updated copy)
and others use devinfo->* (the static const copy)...and they're not
the same.  Just mutating gen_device_info would fix this, by having
only one copy for everybody.

Anyway, I think we could do that as a later cleanup if you like.

Thanks for fixing this!  As is, these three are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160920/bbd7a951/attachment-0001.sig>


More information about the mesa-dev mailing list