summaryrefslogtreecommitdiff
path: root/src/VBox/HostServices/SharedOpenGL/crserverlib/server_lists.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/HostServices/SharedOpenGL/crserverlib/server_lists.c')
-rw-r--r--src/VBox/HostServices/SharedOpenGL/crserverlib/server_lists.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_lists.c b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_lists.c
index 3079c15b..6c3d9bd0 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_lists.c
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_lists.c
@@ -60,6 +60,7 @@ GLuint crServerTranslateProgramID( GLuint id )
void SERVER_DISPATCH_APIENTRY
crServerDispatchNewList( GLuint list, GLenum mode )
{
+ Assert(0);
if (mode == GL_COMPILE_AND_EXECUTE)
crWarning("using glNewList(GL_COMPILE_AND_EXECUTE) can confuse the crserver");
@@ -68,10 +69,37 @@ crServerDispatchNewList( GLuint list, GLenum mode )
cr_server.head_spu->dispatch_table.NewList( list, mode );
}
+static void crServerQueryHWState()
+{
+ GLuint fbFbo, bbFbo;
+ CRClient *client = cr_server.curClient;
+ CRMuralInfo *mural = client ? client->currentMural : NULL;
+ if (mural && mural->fRedirected)
+ {
+ fbFbo = mural->aidFBOs[CR_SERVER_FBO_FB_IDX(mural)];
+ bbFbo = mural->aidFBOs[CR_SERVER_FBO_BB_IDX(mural)];
+ }
+ else
+ {
+ fbFbo = bbFbo = 0;
+ }
+ crStateQueryHWState(fbFbo, bbFbo);
+}
+
void SERVER_DISPATCH_APIENTRY crServerDispatchEndList(void)
{
+ CRContext *g = crStateGetCurrent();
+ CRListsState *l = &(g->lists);
+
cr_server.head_spu->dispatch_table.EndList();
crStateEndList();
+
+#ifndef IN_GUEST
+ if (l->mode==GL_COMPILE)
+ {
+ crServerQueryHWState();
+ }
+#endif
}
void SERVER_DISPATCH_APIENTRY
@@ -83,7 +111,7 @@ crServerDispatchCallList( GLuint list )
/* we're not compiling, so execute the list now */
/* Issue the list as-is */
cr_server.head_spu->dispatch_table.CallList( list );
- crStateQueryHWState();
+ crServerQueryHWState();
}
else {
/* we're compiling glCallList into another list - just pass it through */
@@ -211,7 +239,7 @@ crServerDispatchCallLists( GLsizei n, GLenum type, const GLvoid *lists )
/* we're not compiling, so execute the list now */
/* Issue the list as-is */
cr_server.head_spu->dispatch_table.CallLists( n, type, lists );
- crStateQueryHWState();
+ crServerQueryHWState();
}
else {
/* we're compiling glCallList into another list - just pass it through */
@@ -264,6 +292,12 @@ void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteTextures( GLsizei n, const G
newTextures[i] = crStateGetTextureHWID(textures[i]);
}
+ for (i = 0; i < n; ++i)
+ {
+ crDebug("DeleteTexture: %d, pid %d, ctx %d", textures[i], (uint32_t)cr_server.curClient->pid, cr_server.currentCtxInfo->pContext->id);
+ }
+
+
crStateDeleteTextures(n, textures);
cr_server.head_spu->dispatch_table.DeleteTextures(n, newTextures);
crFree(newTextures);
@@ -280,12 +314,13 @@ void SERVER_DISPATCH_APIENTRY crServerDispatchPrioritizeTextures( GLsizei n, con
return;
}
+ crStatePrioritizeTextures(n, textures, priorities);
+
for (i = 0; i < n; i++)
{
newTextures[i] = crStateGetTextureHWID(textures[i]);
}
- crStatePrioritizeTextures(n, textures, priorities);
cr_server.head_spu->dispatch_table.PrioritizeTextures(n, newTextures, priorities);
crFree(newTextures);
}