diff options
author | Jaroslav Hensl <jara@hensl.cz> | 2024-06-03 21:29:10 +0200 |
---|---|---|
committer | Jaroslav Hensl <jara@hensl.cz> | 2024-06-03 21:29:10 +0200 |
commit | 1280980dd1b1ed8c87c29ea3f95c4c58f844c295 (patch) | |
tree | 09497e6af33d6adc8e97fec6c44476b780975f26 | |
parent | 7940d6adfa546d7946861f81daad8e1774ef2991 (diff) | |
download | vmdisp9x-1280980dd1b1ed8c87c29ea3f95c4c58f844c295.tar.gz |
screen target usage is stable
-rw-r--r-- | enable.c | 12 | ||||
-rw-r--r-- | makefile | 2 | ||||
-rw-r--r-- | vxd_svga.c | 21 | ||||
-rw-r--r-- | vxd_svga_st.c | 10 |
4 files changed, 33 insertions, 12 deletions
@@ -377,10 +377,18 @@ UINT WINAPI __loadds Enable( LPVOID lpDevice, UINT style, LPSTR lpDeviceType, * faster than most mid-1990s graphics cards.
*/
lpInfo->dpCaps1 |= C1_COLORCURSOR | C1_REINIT_ABLE | C1_BYTE_PACKED | C1_GLYPH_INDEX; /* | C1_SLOW_CARD */;
- //lpInfo->dpCaps1 &= ~C1_GLYPH_INDEX;
lpInfo->dpText |= TC_CP_STROKE | TC_RA_ABLE;
-
+
+#if 0
+ /* JH: screen target implementation is much slower for DIB than classical
+ * frame buffer access. So set C1_SLOW_CARD for this case.
+ */
+ if(hda->flags & FB_ACCEL_VMSVGA10_ST)
+ {
+ lpInfo->dpCaps1 |= C1_SLOW_CARD;
+ }
dbg_printf( "lpInfo->dpCaps1: %lX\n", (DWORD)lpInfo->dpCaps1);
+#endif
/* Grab the DIB Engine PDevice size before we add to it. */
wDIBPdevSize = lpInfo->dpDEVICEsize;
@@ -34,7 +34,7 @@ FIXER_CC = wcl386 -q drvfix.c -fe=$(FIXER_EXE) #FLAGS += -DHWBLT
# Set DBGPRINT to add debug printf logging.
-DBGPRINT = 1
+#DBGPRINT = 1
!ifdef DBGPRINT
FLAGS += -DDBGPRINT
@@ -1735,6 +1735,9 @@ BOOL SVGA_validmode(DWORD w, DWORD h, DWORD bpp) case 16:
case 32:
break;
+ case 24:
+ if(!st_useable(24)) return FALSE;
+ break;
default:
return FALSE;
}
@@ -1787,18 +1790,28 @@ BOOL SVGA_setmode(DWORD w, DWORD h, DWORD bpp) /* Make sure, that we drain full FIFO */
SVGA_Sync();
SVGA_Flush_CB_critical();
-
- /* stop command buffer context 0 */
- SVGA_CB_stop();
+#if 0
/* delete old screen at its objects */
if(SVGA_hasAccelScreen())
{
if(st_used)
{
st_destroyScreen();
+ SVGA_Sync();
+ SVGA_Flush_CB_critical();
}
}
+ /* JH: OK, we should normally clean after ourselves,
+ but VirtualBox GUI can crash if there are
+ no surface to draw. Anyway, when we touch legacy
+ screen registers all screen objects will be
+ reset.
+ */
+#endif
+
+ /* stop command buffer context 0 */
+ SVGA_CB_stop();
/* setup by legacy registry */
if(st_useable(bpp))
@@ -1869,7 +1882,7 @@ BOOL SVGA_setmode(DWORD w, DWORD h, DWORD bpp) }
if(st_useable(bpp))
- {
+ {
hda->vram_pm32 = (void*)st_address;
hda->vram_size = st_surface_mb*1024*1024;
hda->vram_pm16 = st_pm16;
diff --git a/vxd_svga_st.c b/vxd_svga_st.c index 2f4ad9d..892f3b0 100644 --- a/vxd_svga_st.c +++ b/vxd_svga_st.c @@ -174,19 +174,19 @@ void st_destroyScreen() SVGA3dCmdDestroyGBScreenTarget *stid;
SVGA3dCmdDestroyGBSurface *gbsurf;
DWORD cmdoff = 0;
-
+
if(st_defined)
{
wait_for_cmdbuf();
-
+
stid = SVGA_cmd3d_ptr(cmdbuf, &cmdoff, SVGA_3D_CMD_DESTROY_GB_SCREENTARGET, sizeof(SVGA3dCmdDestroyGBScreenTarget));
stid->stid = 0;
-
+
gbsurf = SVGA_cmd3d_ptr(cmdbuf, &cmdoff, SVGA_3D_CMD_DESTROY_GB_SURFACE, sizeof(SVGA3dCmdDestroyGBSurface));
gbsurf->sid = ST_SURFACE_ID;
-
+
submit_cmdbuf(cmdoff, SVGA_CB_SYNC, 0);
-
+
st_defined = FALSE;
}
}
|