summaryrefslogtreecommitdiff
path: root/src/VBox/GuestHost/OpenGL/error/errorspu_init.c
blob: d2b04fdff9c98ce6c9214cea35119588e36f1b82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* Copyright (c) 2001, Stanford University
 * All rights reserved
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#include <stdio.h>
#include "cr_spu.h"

extern SPUNamedFunctionTable _cr_error_table[];

static SPUFunctions error_functions = {
        NULL, /* CHILD COPY */
        NULL, /* DATA */
        _cr_error_table /* THE ACTUAL FUNCTIONS */
};

static SPUFunctions *errorSPUInit( int id, SPU *child, SPU *self,
                unsigned int context_id,
                unsigned int num_contexts )
{
        (void) id;
        (void) context_id;
        (void) num_contexts;
        (void) child;
        (void) self;
        return &error_functions;
}

static void errorSPUSelfDispatch(SPUDispatchTable *parent)
{
        (void)parent;
}

static int errorSPUCleanup(void)
{
        return 1;
}

static SPUOptions errorSPUOptions[] = {
   { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
};


int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
             SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
             SPUOptionsPtr *options, int *flags )
{
#ifdef IN_GUEST
        *name = "error";
#else
        *name = "hosterror";
#endif
        *super = NULL;
        *init = errorSPUInit;
        *self = errorSPUSelfDispatch;
        *cleanup = errorSPUCleanup;
        *options = errorSPUOptions;
        *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
        
        return 1;
}