mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-17 10:30:38 +02:00
gallium: add get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
This commit is contained in:
parent
87147e2b09
commit
6305d1cb1c
2 changed files with 25 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ struct pipe_blend_state;
|
|||
struct pipe_blit_info;
|
||||
struct pipe_box;
|
||||
struct pipe_clip_state;
|
||||
struct pipe_compute_state_object_info;
|
||||
struct pipe_constant_buffer;
|
||||
struct pipe_depth_stencil_alpha_state;
|
||||
struct pipe_device_reset_callback;
|
||||
|
|
@ -933,6 +934,9 @@ struct pipe_context {
|
|||
void (*bind_compute_state)(struct pipe_context *, void *);
|
||||
void (*delete_compute_state)(struct pipe_context *, void *);
|
||||
|
||||
void (*get_compute_state_info)(struct pipe_context *, void *,
|
||||
struct pipe_compute_state_object_info *);
|
||||
|
||||
/**
|
||||
* Bind an array of shader resources that will be used by the
|
||||
* compute program. Any resources that were previously bound to
|
||||
|
|
|
|||
|
|
@ -1034,6 +1034,27 @@ struct pipe_compute_state
|
|||
unsigned req_input_mem; /**< Required size of the INPUT resource. */
|
||||
};
|
||||
|
||||
struct pipe_compute_state_object_info
|
||||
{
|
||||
/**
|
||||
* Max number of threads per block supported for the given cso.
|
||||
*/
|
||||
unsigned max_threads;
|
||||
|
||||
/**
|
||||
* Which multiple should the block size be of for best performance.
|
||||
*
|
||||
* E.g. for 8 a block with n * 8 threads would result in optimal utilization
|
||||
* of the hardware.
|
||||
*/
|
||||
unsigned preferred_simd_size;
|
||||
|
||||
/**
|
||||
* How much private memory does this CSO require per thread (a.k.a. NIR scratch memory).
|
||||
*/
|
||||
unsigned private_memory;
|
||||
};
|
||||
|
||||
/**
|
||||
* Structure that contains a callback for device reset messages from the driver
|
||||
* back to the gallium frontend.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue