Changeset 78375 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.cpp
- Timestamp:
- May 3, 2019 9:51:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.cpp ¶
r78263 r78375 52 52 } 53 53 54 cr_server.head_spu->dispatch_table.GetActiveAttrib(crStateGetProgramHWID( program), index, bufSize, &pLocal->length, &pLocal->size, &pLocal->type, (char*)&pLocal[1]);54 cr_server.head_spu->dispatch_table.GetActiveAttrib(crStateGetProgramHWID(&cr_server.StateTracker, program), index, bufSize, &pLocal->length, &pLocal->size, &pLocal->type, (char*)&pLocal[1]); 55 55 crServerReturnValue(pLocal, pLocal->length+1+sizeof(crGetActive_t)); 56 56 crFree(pLocal); … … 74 74 } 75 75 76 cr_server.head_spu->dispatch_table.GetActiveUniform(crStateGetProgramHWID( program), index, bufSize, &pLocal->length, &pLocal->size, &pLocal->type, (char*)&pLocal[1]);76 cr_server.head_spu->dispatch_table.GetActiveUniform(crStateGetProgramHWID(&cr_server.StateTracker, program), index, bufSize, &pLocal->length, &pLocal->size, &pLocal->type, (char*)&pLocal[1]); 77 77 crServerReturnValue(pLocal, pLocal->length+1+sizeof(crGetActive_t)); 78 78 crFree(pLocal); … … 96 96 /* initial (fallback )value */ 97 97 *pLocal = 0; 98 cr_server.head_spu->dispatch_table.GetAttachedShaders(crStateGetProgramHWID( program), maxCount, pLocal, (GLuint*)&pLocal[1]);98 cr_server.head_spu->dispatch_table.GetAttachedShaders(crStateGetProgramHWID(&cr_server.StateTracker, program), maxCount, pLocal, (GLuint*)&pLocal[1]); 99 99 100 100 { … … 103 103 104 104 for (i=0; i<*pLocal; ++i) 105 ids[i] = crStateGLSLShaderHWIDtoID( ids[i]);105 ids[i] = crStateGLSLShaderHWIDtoID(&cr_server.StateTracker, ids[i]); 106 106 } 107 107 … … 127 127 /* initial (fallback )value */ 128 128 *pLocal = 0; 129 cr_server.head_spu->dispatch_table.GetAttachedObjectsARB(crStateGetProgramHWID( containerObj), maxCount, pLocal, (VBoxGLhandleARB*)&pLocal[1]);129 cr_server.head_spu->dispatch_table.GetAttachedObjectsARB(crStateGetProgramHWID(&cr_server.StateTracker, containerObj), maxCount, pLocal, (VBoxGLhandleARB*)&pLocal[1]); 130 130 131 131 { … … 134 134 135 135 for (i=0; i<*pLocal; ++i) 136 ids[i] = crStateGLSLShaderHWIDtoID( ids[i]);136 ids[i] = crStateGLSLShaderHWIDtoID(&cr_server.StateTracker, ids[i]); 137 137 } 138 138 … … 162 162 *pLocal = 0; 163 163 /** @todo recheck*/ 164 hwid = crStateGetProgramHWID( obj);165 if (!hwid) hwid = crStateGetShaderHWID( obj);164 hwid = crStateGetProgramHWID(&cr_server.StateTracker, obj); 165 if (!hwid) hwid = crStateGetShaderHWID(&cr_server.StateTracker, obj); 166 166 cr_server.head_spu->dispatch_table.GetInfoLogARB(hwid, maxLength, pLocal, (char*)&pLocal[1]); 167 167 CRASSERT((*pLocal) <= maxLength); … … 187 187 /* initial (fallback )value */ 188 188 *pLocal = 0; 189 cr_server.head_spu->dispatch_table.GetShaderInfoLog(crStateGetShaderHWID( shader), bufSize, pLocal, (char*)&pLocal[1]);189 cr_server.head_spu->dispatch_table.GetShaderInfoLog(crStateGetShaderHWID(&cr_server.StateTracker, shader), bufSize, pLocal, (char*)&pLocal[1]); 190 190 crServerReturnValue(pLocal, pLocal[0]+sizeof(GLsizei)); 191 191 crFree(pLocal); … … 209 209 /* initial (fallback )value */ 210 210 *pLocal = 0; 211 cr_server.head_spu->dispatch_table.GetProgramInfoLog(crStateGetProgramHWID( program), bufSize, pLocal, (char*)&pLocal[1]);211 cr_server.head_spu->dispatch_table.GetProgramInfoLog(crStateGetProgramHWID(&cr_server.StateTracker, program), bufSize, pLocal, (char*)&pLocal[1]); 212 212 CRASSERT(pLocal[0] <= bufSize); 213 213 crServerReturnValue(pLocal, pLocal[0]+sizeof(GLsizei)); … … 232 232 /* initial (fallback )value */ 233 233 *pLocal = 0; 234 cr_server.head_spu->dispatch_table.GetShaderSource(crStateGetShaderHWID( shader), bufSize, pLocal, (char*)&pLocal[1]);234 cr_server.head_spu->dispatch_table.GetShaderSource(crStateGetShaderHWID(&cr_server.StateTracker, shader), bufSize, pLocal, (char*)&pLocal[1]); 235 235 CRASSERT(pLocal[0] <= bufSize); 236 236 crServerReturnValue(pLocal, pLocal[0]+sizeof(GLsizei)); … … 258 258 /* initial (fallback )value */ 259 259 *pLocal = 0; 260 crStateGLSLProgramCacheUniforms( program, maxcbData, pLocal, (char*)&pLocal[1]);260 crStateGLSLProgramCacheUniforms(&cr_server.StateTracker, program, maxcbData, pLocal, (char*)&pLocal[1]); 261 261 262 262 crServerReturnValue(pLocal, (*pLocal)+sizeof(GLsizei)); … … 284 284 /* initial (fallback )value */ 285 285 *pLocal = 0; 286 crStateGLSLProgramCacheAttribs( program, maxcbData, pLocal, (char*)&pLocal[1]);286 crStateGLSLProgramCacheAttribs(&cr_server.StateTracker, program, maxcbData, pLocal, (char*)&pLocal[1]); 287 287 288 288 crServerReturnValue(pLocal, (*pLocal)+sizeof(GLsizei)); … … 296 296 297 297 /** @todo check if index and location is the same*/ 298 cr_server.head_spu->dispatch_table.GetActiveUniform(crStateGetProgramHWID( program), location, 0, NULL, &size, &type, NULL);299 300 return crStateGetUniformSize( type);298 cr_server.head_spu->dispatch_table.GetActiveUniform(crStateGetProgramHWID(&cr_server.StateTracker, program), location, 0, NULL, &size, &type, NULL); 299 300 return crStateGetUniformSize(&cr_server.StateTracker, type); 301 301 } 302 302 … … 316 316 } 317 317 318 cr_server.head_spu->dispatch_table.GetUniformfv(crStateGetProgramHWID( program), location, pLocal);318 cr_server.head_spu->dispatch_table.GetUniformfv(crStateGetProgramHWID(&cr_server.StateTracker, program), location, pLocal); 319 319 320 320 crServerReturnValue(pLocal, size); … … 337 337 } 338 338 339 cr_server.head_spu->dispatch_table.GetUniformiv(crStateGetProgramHWID( program), location, pLocal);339 cr_server.head_spu->dispatch_table.GetUniformiv(crStateGetProgramHWID(&cr_server.StateTracker, program), location, pLocal); 340 340 341 341 crServerReturnValue(pLocal, size); … … 347 347 GLuint retval, hwVal; 348 348 hwVal = cr_server.head_spu->dispatch_table.CreateShader(type); 349 retval = crStateCreateShader( hwVal, type);349 retval = crStateCreateShader(&cr_server.StateTracker, hwVal, type); 350 350 crServerReturnValue(&retval, sizeof(retval)); 351 351 return retval; /* ignored */ … … 356 356 GLuint retval, hwVal; 357 357 hwVal = cr_server.head_spu->dispatch_table.CreateProgram(); 358 retval = crStateCreateProgram( hwVal);358 retval = crStateCreateProgram(&cr_server.StateTracker, hwVal); 359 359 crServerReturnValue(&retval, sizeof(retval)); 360 360 return retval; /* ignored */ … … 364 364 { 365 365 GLboolean retval; 366 retval = cr_server.head_spu->dispatch_table.IsShader(crStateGetShaderHWID( shader));366 retval = cr_server.head_spu->dispatch_table.IsShader(crStateGetShaderHWID(&cr_server.StateTracker, shader)); 367 367 crServerReturnValue(&retval, sizeof(retval)); 368 368 return retval; /* ignored */ … … 372 372 { 373 373 GLboolean retval; 374 retval = cr_server.head_spu->dispatch_table.IsProgram(crStateGetProgramHWID( program));374 retval = cr_server.head_spu->dispatch_table.IsProgram(crStateGetProgramHWID(&cr_server.StateTracker, program)); 375 375 crServerReturnValue(&retval, sizeof(retval)); 376 376 return retval; /* ignored */ … … 380 380 { 381 381 GLfloat local_params[1] = {0}; 382 GLuint hwid = crStateGetProgramHWID( obj);382 GLuint hwid = crStateGetProgramHWID(&cr_server.StateTracker, obj); 383 383 (void) params; 384 384 385 385 if (!hwid) 386 386 { 387 hwid = crStateGetShaderHWID( obj);387 hwid = crStateGetShaderHWID(&cr_server.StateTracker, obj); 388 388 if (!hwid) 389 389 { … … 399 399 { 400 400 GLint local_params[1] = {0}; 401 GLuint hwid = crStateGetProgramHWID( obj);401 GLuint hwid = crStateGetProgramHWID(&cr_server.StateTracker, obj); 402 402 if (!hwid) 403 403 { 404 hwid = crStateGetShaderHWID( obj);404 hwid = crStateGetShaderHWID(&cr_server.StateTracker, obj); 405 405 if (!hwid) 406 406 {
Note:
See TracChangeset
for help on using the changeset viewer.