VirtualBox

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

最後變更 在這個檔案從40734是 33595,由 vboxsync 提交於 14 年 前

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

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.4 KB
 
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}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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