gallium: add get_compute_state_subgroup_size

This will be required by drivers supporting multiple subgroup sizes with
a given CSO to properly implement OpenCL subgroups.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22893>
This commit is contained in:
Karol Herbst
2023-05-06 21:04:18 +02:00
committed by Marge Bot
parent b72d950939
commit 98d6edc6ad
2 changed files with 13 additions and 0 deletions

View File

@@ -888,6 +888,16 @@ get_compute_state_info
This function allows frontends to query kernel information defined inside
``pipe_compute_state_object_info``.
.. _get_compute_state_subgroup_size:
get_compute_state_subgroup_size
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This function returns the choosen subgroup size when `launch_grid` is
called with the given block size. This doesn't need to be implemented when
only one size is reported through ``PIPE_COMPUTE_CAP_SUBGROUP_SIZES`` or
``pipe_compute_state_object_info::simd_sizes``.
Mipmap generation
^^^^^^^^^^^^^^^^^

View File

@@ -946,6 +946,9 @@ struct pipe_context {
void (*get_compute_state_info)(struct pipe_context *, void *,
struct pipe_compute_state_object_info *);
uint32_t (*get_compute_state_subgroup_size)(struct pipe_context *, void *,
const uint32_t block[3]);
/**
* Bind an array of shader resources that will be used by the
* compute program. Any resources that were previously bound to