Changeset 78375 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.cpp
- Timestamp:
- May 3, 2019 9:51:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.cpp
r78190 r78375 32 32 GLenum err = cr_server.head_spu->dispatch_table.GetError(); 33 33 #endif 34 cr_server.head_spu->dispatch_table.ShaderSource(crStateGetShaderHWID( shader), count, string, length);34 cr_server.head_spu->dispatch_table.ShaderSource(crStateGetShaderHWID(&cr_server.StateTracker, shader), count, string, length); 35 35 #ifdef DEBUG_misha 36 36 err = cr_server.head_spu->dispatch_table.GetError(); … … 45 45 GLint iCompileStatus = GL_FALSE; 46 46 #endif 47 crStateCompileShader( shader);48 cr_server.head_spu->dispatch_table.CompileShader(crStateGetShaderHWID( shader));49 #ifdef DEBUG_misha 50 cr_server.head_spu->dispatch_table.GetShaderiv(crStateGetShaderHWID( shader), GL_COMPILE_STATUS, &iCompileStatus);47 crStateCompileShader(&cr_server.StateTracker, shader); 48 cr_server.head_spu->dispatch_table.CompileShader(crStateGetShaderHWID(&cr_server.StateTracker, shader)); 49 #ifdef DEBUG_misha 50 cr_server.head_spu->dispatch_table.GetShaderiv(crStateGetShaderHWID(&cr_server.StateTracker, shader), GL_COMPILE_STATUS, &iCompileStatus); 51 51 Assert(iCompileStatus == GL_TRUE); 52 52 #endif … … 56 56 void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteShader(GLuint shader) 57 57 { 58 GLuint shaderHW = crStateGetShaderHWID( shader);59 crStateDeleteShader( shader);58 GLuint shaderHW = crStateGetShaderHWID(&cr_server.StateTracker, shader); 59 crStateDeleteShader(&cr_server.StateTracker, shader); 60 60 if (shaderHW) 61 61 cr_server.head_spu->dispatch_table.DeleteShader(shaderHW); … … 66 66 void SERVER_DISPATCH_APIENTRY crServerDispatchAttachShader(GLuint program, GLuint shader) 67 67 { 68 crStateAttachShader(program, shader); 69 cr_server.head_spu->dispatch_table.AttachShader(crStateGetProgramHWID(program), crStateGetShaderHWID(shader)); 68 crStateAttachShader(&cr_server.StateTracker, program, shader); 69 cr_server.head_spu->dispatch_table.AttachShader(crStateGetProgramHWID(&cr_server.StateTracker, program), 70 crStateGetShaderHWID(&cr_server.StateTracker, shader)); 70 71 } 71 72 72 73 void SERVER_DISPATCH_APIENTRY crServerDispatchDetachShader(GLuint program, GLuint shader) 73 74 { 74 crStateDetachShader(program, shader); 75 cr_server.head_spu->dispatch_table.DetachShader(crStateGetProgramHWID(program), crStateGetShaderHWID(shader)); 75 crStateDetachShader(&cr_server.StateTracker, program, shader); 76 cr_server.head_spu->dispatch_table.DetachShader(crStateGetProgramHWID(&cr_server.StateTracker, program), 77 crStateGetShaderHWID(&cr_server.StateTracker, shader)); 76 78 } 77 79 78 80 void SERVER_DISPATCH_APIENTRY crServerDispatchLinkProgram(GLuint program) 79 81 { 80 crStateLinkProgram( program);81 cr_server.head_spu->dispatch_table.LinkProgram(crStateGetProgramHWID( program));82 crStateLinkProgram(&cr_server.StateTracker, program); 83 cr_server.head_spu->dispatch_table.LinkProgram(crStateGetProgramHWID(&cr_server.StateTracker, program)); 82 84 CR_SERVER_DUMP_LINK_PROGRAM(program); 83 85 } … … 85 87 void SERVER_DISPATCH_APIENTRY crServerDispatchUseProgram(GLuint program) 86 88 { 87 crStateUseProgram( program);88 cr_server.head_spu->dispatch_table.UseProgram(crStateGetProgramHWID( program));89 crStateUseProgram(&cr_server.StateTracker, program); 90 cr_server.head_spu->dispatch_table.UseProgram(crStateGetProgramHWID(&cr_server.StateTracker, program)); 89 91 } 90 92 91 93 void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteProgram(GLuint program) 92 94 { 93 GLuint hwId = crStateGetProgramHWID( program);94 crStateDeleteProgram( program);95 GLuint hwId = crStateGetProgramHWID(&cr_server.StateTracker, program); 96 crStateDeleteProgram(&cr_server.StateTracker, program); 95 97 if (hwId) 96 98 cr_server.head_spu->dispatch_table.DeleteProgram(hwId); … … 101 103 void SERVER_DISPATCH_APIENTRY crServerDispatchValidateProgram(GLuint program) 102 104 { 103 crStateValidateProgram( program);104 cr_server.head_spu->dispatch_table.ValidateProgram(crStateGetProgramHWID( program));105 crStateValidateProgram(&cr_server.StateTracker, program); 106 cr_server.head_spu->dispatch_table.ValidateProgram(crStateGetProgramHWID(&cr_server.StateTracker, program)); 105 107 } 106 108 107 109 void SERVER_DISPATCH_APIENTRY crServerDispatchBindAttribLocation(GLuint program, GLuint index, const char * name) 108 110 { 109 crStateBindAttribLocation( program, index, name);110 cr_server.head_spu->dispatch_table.BindAttribLocation(crStateGetProgramHWID( program), index, name);111 crStateBindAttribLocation(&cr_server.StateTracker, program, index, name); 112 cr_server.head_spu->dispatch_table.BindAttribLocation(crStateGetProgramHWID(&cr_server.StateTracker, program), index, name); 111 113 } 112 114 113 115 void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteObjectARB(VBoxGLhandleARB obj) 114 116 { 115 GLuint hwid = crStateDeleteObjectARB( obj);117 GLuint hwid = crStateDeleteObjectARB(&cr_server.StateTracker, obj); 116 118 117 119 if (hwid) … … 124 126 { 125 127 GLint retval; 126 retval = cr_server.head_spu->dispatch_table.GetAttribLocation(crStateGetProgramHWID( program), name );128 retval = cr_server.head_spu->dispatch_table.GetAttribLocation(crStateGetProgramHWID(&cr_server.StateTracker, program), name ); 127 129 crServerReturnValue( &retval, sizeof(retval) ); 128 130 return retval; /* WILL PROBABLY BE IGNORED */ … … 135 137 if (pname==GL_PROGRAM_OBJECT_ARB) 136 138 { 137 retval = crStateGLSLProgramHWIDtoID( retval);139 retval = crStateGLSLProgramHWIDtoID(&cr_server.StateTracker, retval); 138 140 } 139 141 crServerReturnValue( &retval, sizeof(retval) ); … … 144 146 { 145 147 GLint retval; 146 retval = cr_server.head_spu->dispatch_table.GetUniformLocation(crStateGetProgramHWID( program), name);148 retval = cr_server.head_spu->dispatch_table.GetUniformLocation(crStateGetProgramHWID(&cr_server.StateTracker, program), name); 147 149 crServerReturnValue( &retval, sizeof(retval) ); 148 150 return retval; /* WILL PROBABLY BE IGNORED */ … … 153 155 GLint local_params[1] = {0}; 154 156 (void) params; 155 cr_server.head_spu->dispatch_table.GetProgramiv(crStateGetProgramHWID( program), pname, local_params);157 cr_server.head_spu->dispatch_table.GetProgramiv(crStateGetProgramHWID(&cr_server.StateTracker, program), pname, local_params); 156 158 crServerReturnValue( &(local_params[0]), 1*sizeof(GLint) ); 157 159 } … … 161 163 GLint local_params[1] = {0}; 162 164 (void) params; 163 cr_server.head_spu->dispatch_table.GetShaderiv( crStateGetShaderHWID( shader), pname, local_params );165 cr_server.head_spu->dispatch_table.GetShaderiv( crStateGetShaderHWID(&cr_server.StateTracker, shader), pname, local_params ); 164 166 crServerReturnValue( &(local_params[0]), 1*sizeof(GLint) ); 165 167 } … … 197 199 pLocalProgs[i] = crServerTranslateProgramID(programs[i]); 198 200 } 199 crStateDeleteProgramsARB( n, pLocalProgs);201 crStateDeleteProgramsARB(&cr_server.StateTracker, n, pLocalProgs); 200 202 cr_server.head_spu->dispatch_table.DeleteProgramsARB(n, pLocalProgs); 201 203 crFree(pLocalProgs);
Note:
See TracChangeset
for help on using the changeset viewer.