VirtualBox

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

Last change on this file since 63714 was 63205, checked in by vboxsync, 9 years ago

GA/common/crOpenGL: warnings (gcc)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.5 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 RT_NOREF(foo);
28 sscanf( response, "%d", &(pack_spu.emit_GATHER_POST_SWAPBUFFERS) );
29}
30
31static void set_swapbuffer_sync( void *foo, const char *response )
32{
33 RT_NOREF(foo);
34 sscanf( response, "%d", &(pack_spu.swapbuffer_sync) );
35}
36
37
38
39/* No SPU options yet. Well.. not really..
40 */
41SPUOptions packSPUOptions[] = {
42 { "emit_GATHER_POST_SWAPBUFFERS", CR_BOOL, 1, "0", NULL, NULL,
43 "Emit a parameter after SwapBuffers", (SPUOptionCB)set_emit },
44
45 { "swapbuffer_sync", CR_BOOL, 1, "1", NULL, NULL,
46 "Sync on SwapBuffers", (SPUOptionCB) set_swapbuffer_sync },
47
48 { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
49};
50
51
52void packspuSetVBoxConfiguration( const SPU *child_spu )
53{
54 RT_NOREF(child_spu);
55 __setDefaults();
56 pack_spu.emit_GATHER_POST_SWAPBUFFERS = 0;
57 pack_spu.swapbuffer_sync = 0;
58 pack_spu.name = crStrdup("vboxhgcm://llp:7000");
59 pack_spu.buffer_size = 5 * 1024 * 1024;
60}
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