mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 03:48:06 +02:00
pipe-loader: Document the behavior regarding screen creating failures
Avoid inconsistent behavior on screen creation failures which might lead to double free issues. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23054>
This commit is contained in:
parent
744c849a08
commit
6b4f80f7f0
1 changed files with 16 additions and 1 deletions
|
|
@ -31,8 +31,23 @@
|
|||
#include "pipe_loader.h"
|
||||
|
||||
struct pipe_loader_ops {
|
||||
/**
|
||||
* Create a pipe_screen for the specified pipe_loader_device.
|
||||
*
|
||||
* Consumers are expected to use pipe_loader_create_screen_vk() or
|
||||
* pipe_loader_create_screen() which will take care of creating the
|
||||
* configuration.
|
||||
*
|
||||
* Implementations should not free the device here, even on failure.
|
||||
*
|
||||
* \param dev The device the screen will be created for
|
||||
* \param config The screen configuration
|
||||
* \param sw_vk Whether the device is for software vulkan
|
||||
* \return a pipe_screen, or NULL on failure
|
||||
*/
|
||||
struct pipe_screen *(*create_screen)(struct pipe_loader_device *dev,
|
||||
const struct pipe_screen_config *config, bool sw_vk);
|
||||
const struct pipe_screen_config *config,
|
||||
bool sw_vk);
|
||||
|
||||
const struct driOptionDescription *(*get_driconf)(struct pipe_loader_device *dev,
|
||||
unsigned *count);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue