gallium: add pipe_screen::is_compute_copy_faster hook
this can be used to query whether a driver expects a given texture copy to be faster as a compute shader or using cpu/gfx transfers Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
This commit is contained in:
parent
a854cbc7b5
commit
0b30a7a243
|
@ -179,6 +179,19 @@ struct pipe_screen {
|
|||
struct pipe_context * (*context_create)(struct pipe_screen *screen,
|
||||
void *priv, unsigned flags);
|
||||
|
||||
/**
|
||||
* Check if the given image copy will be faster on compute
|
||||
* \param cpu If true, this is checking against CPU fallback,
|
||||
* otherwise the copy will be on GFX
|
||||
*/
|
||||
bool (*is_compute_copy_faster)( struct pipe_screen *,
|
||||
enum pipe_format src_format,
|
||||
enum pipe_format dst_format,
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
unsigned depth,
|
||||
bool cpu );
|
||||
|
||||
/**
|
||||
* Check if the given pipe_format is supported as a texture or
|
||||
* drawing surface.
|
||||
|
|
Loading…
Reference in New Issue