Changeset 51200 in vbox for trunk/src/VBox/Additions/common/crOpenGL/pack
- Timestamp:
- May 6, 2014 5:21:16 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93582
- Location:
- trunk/src/VBox/Additions/common/crOpenGL/pack
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu.h
r49264 r51200 23 23 # include "cr_dump.h" 24 24 #endif 25 26 extern uint32_t g_u32VBoxHostCaps; 25 27 26 28 typedef struct thread_info_t ThreadInfo; -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c
r50041 r51200 115 115 } 116 116 117 GLint PACKSPU_APIENTRY packspu_GetAttribLocationUnchached( GLuint program, const char * name ) 118 { 119 GET_THREAD(thread); 120 int writeback = 1; 121 GLint return_val = (GLint) 0; 122 if (!CRPACKSPU_IS_WDDM_CRHGSMI() && !(pack_spu.thread[pack_spu.idxThreadInUse].netServer.conn->actual_network)) 123 { 124 crError( "packspu_GetAttribLocation doesn't work when there's no actual network involved!\nTry using the simplequery SPU in your chain!" ); 125 } 126 if (pack_spu.swap) 127 { 128 crPackGetAttribLocationSWAP( program, name, &return_val, &writeback ); 129 } 130 else 131 { 132 crPackGetAttribLocation( program, name, &return_val, &writeback ); 133 } 134 packspuFlush( (void *) thread ); 135 CRPACKSPU_WRITEBACK_WAIT(thread, writeback); 136 if (pack_spu.swap) 137 { 138 return_val = (GLint) SWAP32(return_val); 139 } 140 return return_val; 141 } 142 143 GLint PACKSPU_APIENTRY packspu_GetAttribLocation(GLuint program, const char * name) 144 { 145 if (!(CR_VBOX_CAP_GETATTRIBSLOCATIONS & g_u32VBoxHostCaps)) 146 return packspu_GetAttribLocationUnchached(program, name); 147 148 if (!crStateIsProgramAttribsCached(program)) 149 { 150 GET_THREAD(thread); 151 int writeback = 1; 152 GLsizei maxcbData; 153 GLsizei *pData; 154 GLint mu; 155 156 packspu_GetIntegerv(GL_MAX_VERTEX_ATTRIBS, &mu); 157 maxcbData = 4*32*mu*sizeof(char); 158 159 pData = (GLsizei *) crAlloc(maxcbData+sizeof(GLsizei)); 160 if (!pData) 161 { 162 crWarning("packspu_GetAttribLocation: not enough memory, fallback to single query"); 163 return packspu_GetAttribLocationUnchached(program, name); 164 } 165 166 crPackGetAttribsLocations(program, maxcbData, pData, NULL, &writeback); 167 168 packspuFlush((void *) thread); 169 CRPACKSPU_WRITEBACK_WAIT(thread, writeback); 170 171 crStateGLSLProgramCacheAttribs(program, pData[0], &pData[1]); 172 173 CRASSERT(crStateIsProgramAttribsCached(program)); 174 175 crFree(pData); 176 } 177 178 /*crDebug("packspu_GetAttribLocation(%d, %s)=%i", program, name, crStateGetAttribLocation(program, name));*/ 179 return crStateGetAttribLocation(program, name); 180 } 181 117 182 void PACKSPU_APIENTRY packspu_GetUniformsLocations(GLuint program, GLsizei maxcbData, GLsizei * cbData, GLvoid * pData) 118 183 { … … 121 186 (void) cbData; 122 187 (void) pData; 123 crWarning("packspu_GetUniformsLocations shouldn't be called directly"); 188 WARN(("packspu_GetUniformsLocations shouldn't be called directly")); 189 } 190 191 void PACKSPU_APIENTRY packspu_GetAttribsLocations(GLuint program, GLsizei maxcbData, GLsizei * cbData, GLvoid * pData) 192 { 193 (void) program; 194 (void) maxcbData; 195 (void) cbData; 196 (void) pData; 197 WARN(("packspu_GetAttribsLocations shouldn't be called directly")); 124 198 } 125 199 -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c
r50984 r51200 13 13 #include "packspu.h" 14 14 #include "packspu_proto.h" 15 16 uint32_t g_u32VBoxHostCaps = 0; 15 17 16 18 static void … … 244 246 if (server->conn) 245 247 { 246 uint32_t u32HostCaps = crNetHostCapsGet();247 if ( u32HostCaps & CR_VBOX_CAP_CMDBLOCKS)248 g_u32VBoxHostCaps = crNetHostCapsGet(); 249 if (g_u32VBoxHostCaps & CR_VBOX_CAP_CMDBLOCKS) 248 250 crPackCmdBlocksEnable(); 249 251 } -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special
r49264 r51200 84 84 DeleteProgram 85 85 GetUniformLocation 86 GetAttribLocation 86 87 GetUniformsLocations 88 GetAttribsLocations 87 89 BindFramebufferEXT 88 90 DeleteObjectARB
Note:
See TracChangeset
for help on using the changeset viewer.