VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthroughspu_init.c@ 63206

Last change on this file since 63206 was 15532, checked in by vboxsync, 15 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#include "cr_error.h"
8#include "passthroughspu.h"
9
10static SPUFunctions passthrough_functions = {
11 NULL, /* CHILD COPY */
12 NULL, /* DATA */
13 _cr_passthrough_table /* THE ACTUAL FUNCTIONS */
14};
15
16static SPUFunctions *
17passthroughSPUInit( int id, SPU *child, SPU *self,
18 unsigned int context_id,
19 unsigned int num_contexts )
20{
21 (void) id;
22 (void) self;
23 (void) context_id;
24 (void) num_contexts;
25
26 if (child == NULL)
27 {
28 crError( "You can't load the passthrough SPU as the last SPU in a chain!" );
29 }
30 BuildPassthroughTable( child );
31 return &passthrough_functions;
32}
33
34static void
35passthroughSPUSelfDispatch(SPUDispatchTable *parent)
36{
37 (void)parent;
38}
39
40static int
41passthroughSPUCleanup(void)
42{
43 return 1;
44}
45
46static SPUOptions passthroughSPUOptions[] = {
47 { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
48};
49
50
51int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
52 SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
53 SPUOptionsPtr *options, int *flags )
54{
55 *name = "passthrough";
56 *super = NULL;
57 *init = passthroughSPUInit;
58 *self = passthroughSPUSelfDispatch;
59 *cleanup = passthroughSPUCleanup;
60 *options = passthroughSPUOptions;
61 *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
62
63 return 1;
64}
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use