aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Hensl <jara@hensl.cz>2024-07-24 23:34:05 +0200
committerJaroslav Hensl <jara@hensl.cz>2024-07-24 23:34:05 +0200
commit87275514290d0deded14a45dd3368e1ace7cfa58 (patch)
tree15ef5b34a8fca8d9e15a530243e75b12b311c40d
parent090cdbef35dae25130f4fe86d1106dd486a3b13f (diff)
downloadvmdisp9x-87275514290d0deded14a45dd3368e1ace7cfa58.tar.gz
VMW vGPU10 (works) + little cleanup
-rw-r--r--3d_accel.h4
-rw-r--r--vxd_strings.h9
-rw-r--r--vxd_svga.c32
-rw-r--r--vxd_svga_cb.c8
-rw-r--r--vxd_svga_mem.c2
5 files changed, 19 insertions, 36 deletions
diff --git a/3d_accel.h b/3d_accel.h
index 2435d1c..1d9fcec 100644
--- a/3d_accel.h
+++ b/3d_accel.h
@@ -33,7 +33,7 @@ THE SOFTWARE.
#endif
#endif
-#define API_3DACCEL_VER 20240723
+#define API_3DACCEL_VER 20240724
#define ESCAPE_DRV_NT 0x1103 /* (4355) */
@@ -211,7 +211,7 @@ typedef struct SVGA_DB_context
{
DWORD pid;
void *cotable;
- DWORD pad1;
+ DWORD gmrId; /* mob id for context */
DWORD pad2;
} SVGA_DB_context_t;
diff --git a/vxd_strings.h b/vxd_strings.h
index c8dc80b..0766bfb 100644
--- a/vxd_strings.h
+++ b/vxd_strings.h
@@ -136,15 +136,12 @@ DSTR(dbg_hw_mouse_hide, "hw mouse: hide\n");
DSTR(dbg_cb_flags, "CB: flags = %lX\n");
-DSTR(dbg_cb_start, "CB start success!\n");
-DSTR(dbg_cb_start_err, "CB start error: %d\n");
-DSTR(dbg_cb_stop, "CB stop!\n");
DSTR(dbg_wait_cb, "... Waiting for CB at line: %ld\n");
-DSTR(dbg_ctr_start, "CB CTRL begin\n");
-DSTR(dbg_ctr_end, "CB CTRL end\n");
+DSTR(dbg_ctr_start, "CB CTRL: ");
-DSTR(dbg_cb_stop_status, "CB stop status %ld\n");
+DSTR(dbg_cb_stop_status, "stop (status %ld)\n");
+DSTR(dbg_cb_start_status, "start (status %ld)\n");
DSTR(dbg_irq, "IRQ!\n");
diff --git a/vxd_svga.c b/vxd_svga.c
index 73b8bda..71055b5 100644
--- a/vxd_svga.c
+++ b/vxd_svga.c
@@ -295,6 +295,7 @@ void *SVGA_cmd3d_ptr(DWORD *buf, DWORD *pOffset, DWORD cmd, DWORD cmdsize)
return (void*)(buf + pp + 2);
}
+#if 0
void SVGA_IRQ_proc()
{
dbg_printf(dbg_irq);
@@ -311,6 +312,7 @@ void __declspec(naked) SVGA_IRQ_entry()
VxDJmp(VPICD, Set_Int_Request);
}
+#endif
BOOL SVGA_vxdcmd(DWORD cmd)
{
@@ -384,7 +386,9 @@ BOOL SVGA_init_hw()
DWORD conf_rgb565bug = 1;
DWORD conf_cb = 1;
DWORD conf_hw_version = SVGA_VERSION_2;
+#if 0
uint8 irq = 0;
+#endif
int rc;
@@ -461,6 +465,9 @@ BOOL SVGA_init_hw()
vid.Hw_Int_Proc = (DWORD)SVGA_IRQ_entry;
vid.IRET_Time_Out = 500;
+ /* JH: OK this is NOT way how catch IRQ, because all PCI video IRQ
+ are catched by fat vdd driver.
+ */
if(VPICD_Virtualize_IRQ(&vid))
{
dbg_printf(dbg_irq_install, irq);
@@ -482,7 +489,6 @@ BOOL SVGA_init_hw()
SVGA_Enable();
/* allocate GB tables, if supported */
-
if(SVGA_ReadReg(SVGA_REG_CAPABILITIES) & SVGA_CAP_GBOBJECTS)
{
SVGA_OTable_alloc(st_surface_mb > 0);
@@ -505,8 +511,6 @@ BOOL SVGA_init_hw()
}
}
- //cb_sem = Create_Semaphore(1);
-
SVGA_DB_alloc();
/* allocate buffer for enable and disable CB */
@@ -573,18 +577,6 @@ BOOL SVGA_init_hw()
cache_enable(TRUE);
}
}
-
- /*
- {
- SVGA_region_info_t testregion;
- memset(&testregion, 0, sizeof(SVGA_region_info_t));
-
- testregion.region_id = ST_REGION_ID;
- testregion.size = 4*1024*1024;
- testregion.mobonly = FALSE;
-
- SVGA_region_create(&testregion);
- }*/
return TRUE;
}
@@ -615,6 +607,11 @@ BOOL SVGA3D_Init(void)
if((gSVGA.capabilities & SVGA_CAP_GBOBJECTS))
{
+ if(!SVGA_GetDevCap(SVGA3D_DEVCAP_DXCONTEXT))
+ {
+ /* don't allow 3D on vGPU without DX context */
+ return FALSE;
+ }
hwVersion = SVGA3D_HWVERSION_WS8_B1;
}
else if(SVGA_HasFIFOCap(SVGA_FIFO_CAP_3D_HWVERSION_REVISED))
@@ -832,11 +829,6 @@ BOOL SVGA_setmode(DWORD w, DWORD h, DWORD bpp)
/* start command buffer context 0 */
SVGA_CB_start();
- if(gb_support)
- {
- SVGA_OTable_load();
- }
-
has3D = SVGA3D_Init();
SVGA_Sync();
diff --git a/vxd_svga_cb.c b/vxd_svga_cb.c
index 2fcbc81..fdf844b 100644
--- a/vxd_svga_cb.c
+++ b/vxd_svga_cb.c
@@ -534,8 +534,6 @@ static DWORD SVGA_CB_ctr(DWORD data_size)
//End_Critical_Section();
- dbg_printf(dbg_ctr_end);
-
return cb->status;
}
@@ -557,15 +555,15 @@ void SVGA_CB_start()
status = SVGA_CB_ctr(sizeof(cb_enable_t));
+ dbg_printf(dbg_cb_start_status, status);
+
if(status == SVGA_CB_STATUS_COMPLETED)
{
- dbg_printf(dbg_cb_start);
cb_context0 = TRUE;
}
else
{
cb_support = FALSE;
- dbg_printf(dbg_cb_start_err, status);
}
}
}
@@ -590,8 +588,6 @@ void SVGA_CB_stop()
status = SVGA_CB_ctr(sizeof(cb_enable_t));
dbg_printf(dbg_cb_stop_status, status);
-
- dbg_printf(dbg_cb_stop);
}
}
diff --git a/vxd_svga_mem.c b/vxd_svga_mem.c
index 361443b..2fc4748 100644
--- a/vxd_svga_mem.c
+++ b/vxd_svga_mem.c
@@ -372,8 +372,6 @@ void SVGA_OTable_unload()
submit_cmdbuf(cmd_offset, SVGA_CB_SYNC, 0);
}
-
-/**/
/**
* Delete item from cache
**/