mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
pipe-loader: directly use pipe_loader_sw_probe_null() at probe time
Due to the nature of the other sw winsys' we cannot use them during the generic probe stage. As such there is little point in keeping the abstraction layer. Cc: Tom Stellard <thomas.stellard@amd.com> Cc: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
4e3c06a501
commit
ff9cd8a67c
1 changed files with 4 additions and 13 deletions
|
|
@ -46,10 +46,6 @@ struct pipe_loader_sw_device {
|
|||
|
||||
static struct pipe_loader_ops pipe_loader_sw_ops;
|
||||
|
||||
static struct sw_winsys *(*backends[])() = {
|
||||
null_sw_create
|
||||
};
|
||||
|
||||
static bool
|
||||
pipe_loader_sw_probe_init_common(struct pipe_loader_sw_device *sdev)
|
||||
{
|
||||
|
|
@ -124,16 +120,11 @@ pipe_loader_sw_probe_null(struct pipe_loader_device **devs)
|
|||
int
|
||||
pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev)
|
||||
{
|
||||
int i;
|
||||
int i = 1;
|
||||
|
||||
for (i = 0; i < Elements(backends); i++) {
|
||||
if (i < ndev) {
|
||||
struct pipe_loader_sw_device *sdev = CALLOC_STRUCT(pipe_loader_sw_device);
|
||||
/* TODO: handle CALLOC_STRUCT failure */
|
||||
|
||||
sdev->ws = backends[i]();
|
||||
pipe_loader_sw_probe_init_common(sdev);
|
||||
devs[i] = &sdev->base;
|
||||
if (i < ndev) {
|
||||
if (!pipe_loader_sw_probe_null(devs)) {
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue