[D3D] Some locking fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
 - some threading fixes (prevents some dead-locks)

-- 
		 Lionel Ulmer - http://www.bbrox.org/
--- dlls/ddraw_CVS/d3ddevice/mesa.c	Mon May 26 10:05:22 2003
+++ dlls/ddraw/d3ddevice/mesa.c	Mon May 26 10:48:21 2003
@@ -1639,6 +1639,8 @@
         This->state_block.texture_stage_state[dwStage][D3DTSS_ADDRESSU - 1] = dwState;
 	This->state_block.texture_stage_state[dwStage][D3DTSS_ADDRESSV - 1] = dwState;
     }
+
+    ENTER_GL();
     
     switch (d3dTexStageStateType) {
         case D3DTSS_MINFILTER:
@@ -1979,7 +1981,9 @@
 	    FIXME(" Unhandled stage type : %s => %08lx\n", type, dwState);
 	    break;
     }
-   
+
+    LEAVE_GL();
+    
     return DD_OK;
 }
 
@@ -3031,7 +3035,9 @@
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, max_tex);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, min_tex);
     glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, tex_env);
+    LEAVE_GL();
     d3d_dev->matrices_updated(d3d_dev, TEXMAT0_CHANGED);
+    ENTER_GL();
 #if 0
     /* I keep this code here as it's very useful to debug :-) */
     {
--- dlls/ddraw_CVS/d3dtexture.c	Mon May 26 10:05:23 2003
+++ dlls/ddraw/d3dtexture.c	Mon May 26 11:05:08 2003
@@ -723,6 +723,7 @@
 		glReadBuffer(GL_BACK);
 	    else {
 		ERR("Wrong surface type for locking !\n");
+		glBindTexture(GL_TEXTURE_2D, cur_tex);
 		LEAVE_GL();
 		return DDERR_INVALIDPARAMS;
 	    }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux