VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_config.c@ 48999

Last change on this file since 48999 was 33595, checked in by vboxsync, 14 years ago

src/*: more spelling fixes (logging), thanks Timeless!

  • 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 "packspu.h"
8#include "cr_string.h"
9#include "cr_error.h"
10#include "cr_spu.h"
11#include "cr_mem.h"
12
13#include <stdio.h>
14
15static void __setDefaults( void )
16{
17 crMemZero(pack_spu.context, CR_MAX_CONTEXTS * sizeof(ContextInfo));
18 pack_spu.numContexts = 0;
19
20 crMemZero(pack_spu.thread, MAX_THREADS * sizeof(ThreadInfo));
21 pack_spu.numThreads = 0;
22}
23
24
25static void set_emit( void *foo, const char *response )
26{
27 sscanf( response, "%d", &(pack_spu.emit_GATHER_POST_SWAPBUFFERS) );
28}
29
30static void set_swapbuffer_sync( void *foo, const char *response )
31{
32 sscanf( response, "%d", &(pack_spu.swapbuffer_sync) );
33}
34
35
36
37/* No SPU options yet. Well.. not really..
38 */
39SPUOptions packSPUOptions[] = {
40 { "emit_GATHER_POST_SWAPBUFFERS", CR_BOOL, 1, "0", NULL, NULL,
41 "Emit a parameter after SwapBuffers", (SPUOptionCB)set_emit },
42
43 { "swapbuffer_sync", CR_BOOL, 1, "1", NULL, NULL,
44 "Sync on SwapBuffers", (SPUOptionCB) set_swapbuffer_sync },
45
46 { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
47};
48
49
50void packspuSetVBoxConfiguration( const SPU *child_spu )
51{
52 __setDefaults();
53 pack_spu.emit_GATHER_POST_SWAPBUFFERS = 0;
54 pack_spu.swapbuffer_sync = 0;
55 pack_spu.name = crStrdup("vboxhgcm://llp:7000");
56 pack_spu.buffer_size = 5 * 1024 * 1024;
57}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette