[Mesa-dev] [PATCH 10/13] pipe-loader: introduce pipe_loader_sw_probe_null helper function
Francisco Jerez
currojerez at riseup.net
Thu Feb 13 04:49:55 PST 2014
Emil Velikov <emil.l.velikov at gmail.com> writes:
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> src/gallium/auxiliary/pipe-loader/pipe_loader.h | 10 ++++++++++
> src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 18 +++++++++++++++++-
> 2 files changed, 27 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
> index f5a7252..026f809 100644
> --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
> +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
> @@ -133,6 +133,16 @@ pipe_loader_sw_probe_dri(struct pipe_loader_device **devs,
>
>
> /**
> + * Initialize a null sw device.
> + *
> + * This function is platform-specific.
> + *
> + * \sa pipe_loader_probe
> + */
> +bool
> +pipe_loader_sw_probe_null(struct pipe_loader_device **devs);
> +
> +/**
> * Get a list of known software devices.
> *
> * This function is platform-specific.
> diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> index 954e16e..618a911 100644
> --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> @@ -85,7 +85,23 @@ pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, struct drisw_loader_f
> return true;
> }
>
> -int
> +bool
> +pipe_loader_sw_probe_null(struct pipe_loader_device **devs)
> +{
> + struct pipe_loader_sw_device *sdev = CALLOC_STRUCT(pipe_loader_sw_device);
> +
> + if (!sdev)
> + return false;
> +
> + sdev->base.type = PIPE_LOADER_DEVICE_SOFTWARE;
> + sdev->base.driver_name = "swrast";
> + sdev->base.ops = &pipe_loader_sw_ops;
> + sdev->ws = null_sw_create();
> + *devs = &sdev->base;
> +
> + return true;
> +}
> +
Missing return type here.
> pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev)
> {
> int i;
Maybe remove pipe_loader_sw_probe() altogether and change pipe_loader.c
to use pipe_loader_sw_probe_null() instead?
> --
> 1.8.5.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140213/dadb4359/attachment.pgp>
More information about the mesa-dev
mailing list