Changeset 51559 in vbox for trunk/src/VBox/Additions/common/crOpenGL/pack
- Timestamp:
- Jun 5, 2014 9:18:41 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94217
- Location:
- trunk/src/VBox/Additions/common/crOpenGL/pack
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu.h
r51313 r51559 158 158 extern ThreadInfo *packspuNewCtxThread( struct VBOXUHGSMI *pHgsmi ); 159 159 160 161 162 #define MAGIC_OFFSET 3000 163 160 164 #endif /* CR_PACKSPU_H */ -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
r51319 r51559 10 10 #include "cr_string.h" 11 11 #include "packspu_proto.h" 12 13 #define MAGIC_OFFSET 300014 12 15 13 /* … … 231 229 232 230 packspu_ChromiumParameteriCR(param, value); 231 232 #ifdef CHROMIUM_THREADSAFE 233 crUnlockMutex(&_PackMutex); 234 #endif 235 236 if (CRPACKSPU_IS_WDDM_CRHGSMI()) 237 { 238 /* restore the packer context to the tls */ 239 crPackSetContext(curPacker); 240 } 241 } 242 243 GLvoid PACKSPU_APIENTRY 244 packspu_VBoxConChromiumParametervCR(GLint con, GLenum target, GLenum type, GLsizei count, const GLvoid *values) 245 { 246 GET_THREAD(thread); 247 CRPackContext * curPacker = crPackGetContext(); 248 ThreadInfo *curThread = thread; 249 int writeback = 1; 250 GLint serverCtx = (GLint) -1; 251 252 CRASSERT(!curThread == !curPacker); 253 CRASSERT(!curThread || !curPacker || curThread->packer == curPacker); 254 #ifdef CHROMIUM_THREADSAFE 255 crLockMutex(&_PackMutex); 256 #endif 257 258 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 259 CRASSERT(!con == !CRPACKSPU_IS_WDDM_CRHGSMI()); 260 #endif 261 262 if (CRPACKSPU_IS_WDDM_CRHGSMI()) 263 { 264 if (!con) 265 { 266 crError("connection should be specified!"); 267 return; 268 } 269 thread = GET_THREAD_VAL_ID(con); 270 } 271 else 272 { 273 CRASSERT(!con); 274 if (!thread) 275 { 276 thread = packspuNewThread( 277 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 278 NULL 279 #endif 280 ); 281 } 282 } 283 CRASSERT(thread); 284 CRASSERT(thread->packer); 285 286 crPackSetContext( thread->packer ); 287 288 packspu_ChromiumParametervCR(target, type, count, values); 233 289 234 290 #ifdef CHROMIUM_THREADSAFE -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
r51313 r51559 15 15 CRMessage msg; 16 16 int len; 17 17 GLint ai32ServerValues[2]; 18 GLboolean fFlush = GL_FALSE; 18 19 GET_THREAD(thread); 19 20 … … 30 31 len = sizeof(CRMessageGather); 31 32 crNetSend(thread->netServer.conn, NULL, &msg, len); 32 break; 33 33 return; 34 35 case GL_SHARE_LISTS_CR: 36 { 37 ContextInfo *pCtx[2]; 38 GLint *ai32Values; 39 int i; 40 if (count != 2) 41 { 42 WARN(("GL_SHARE_LISTS_CR invalid cound %d", count)); 43 return; 44 } 45 46 if (type != GL_UNSIGNED_INT && type != GL_INT) 47 { 48 WARN(("GL_SHARE_LISTS_CR invalid type %d", type)); 49 return; 50 } 51 52 ai32Values = (GLint*)values; 53 54 for (i = 0; i < 2; ++i) 55 { 56 const int slot = ai32Values[i] - MAGIC_OFFSET; 57 58 if (slot < 0 || slot >= pack_spu.numContexts) 59 { 60 WARN(("GL_SHARE_LISTS_CR invalid value[%d] %d", i, ai32Values[i])); 61 return; 62 } 63 64 pCtx[i] = &pack_spu.context[slot]; 65 if (!pCtx[i]->clientState) 66 { 67 WARN(("GL_SHARE_LISTS_CR invalid pCtx1 for value[%d] %d", i, ai32Values[i])); 68 return; 69 } 70 71 ai32ServerValues[i] = pCtx[i]->serverCtx; 72 } 73 74 crStateShareLists(pCtx[0]->clientState, pCtx[1]->clientState); 75 76 values = ai32ServerValues; 77 78 fFlush = GL_TRUE; 79 80 break; 81 } 82 34 83 default: 35 if (pack_spu.swap) 36 crPackChromiumParametervCRSWAP(target, type, count, values); 37 else 38 crPackChromiumParametervCR(target, type, count, values); 39 } 40 41 84 break; 85 } 86 87 if (pack_spu.swap) 88 crPackChromiumParametervCRSWAP(target, type, count, values); 89 else 90 crPackChromiumParametervCR(target, type, count, values); 91 92 if (fFlush) 93 packspuFlush( (void *) thread ); 42 94 } 43 95 -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special
r51200 r51559 111 111 VBoxCreateContext 112 112 VBoxConChromiumParameteriCR 113 VBoxConChromiumParametervCR 113 114 VBoxWindowCreate 114 115 VBoxWindowDestroy
Note:
See TracChangeset
for help on using the changeset viewer.