aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Hensl <jara@hensl.cz>2024-07-31 20:10:06 +0200
committerJaroslav Hensl <jara@hensl.cz>2024-07-31 20:10:06 +0200
commit3edc12d83254c04554461fdbb310dd46d284c27c (patch)
tree9a16c7bbea53839280243f372c8c2f63294049a1
parentbe8a59eca43f5de0b25c332f4e7c6f799fce307f (diff)
downloadvmdisp9x-3edc12d83254c04554461fdbb310dd46d284c27c.tar.gz
DD: surface align was too largev1.2024.0.73
-rw-r--r--dddrv.c3
-rw-r--r--makefile2
-rw-r--r--vxd_lib.c2
-rw-r--r--vxd_mouse.c16
-rw-r--r--vxd_strings.h10
-rw-r--r--vxd_svga_cb.c3
-rw-r--r--vxd_svga_mem.c33
-rw-r--r--vxd_svga_mouse.c6
8 files changed, 44 insertions, 31 deletions
diff --git a/dddrv.c b/dddrv.c
index 633413c..129d787 100644
--- a/dddrv.c
+++ b/dddrv.c
@@ -233,7 +233,8 @@ static void buildDDHALInfo(VMDAHAL_t __far *hal, int modeidx)
{
// static DWORD AlignTbl [ 9 ] = { 64, 64, 64, 64, 64, 64, 64, 64, 64 };
// static DWORD AlignTbl [ 9 ] = { 8, 8, 8, 8, 16, 8, 24, 8, 32 };
- static DWORD AlignTbl [ 9 ] = { 128, 128, 128, 128, 128, 128, 128, 128, 128 }; /* we can now use aligned SSE to manipulate with surfaces */
+// static DWORD AlignTbl [ 9 ] = { 128, 128, 128, 128, 128, 128, 128, 128, 128 };
+ static DWORD AlignTbl [ 9 ] = { 16, 16, 16, 16, 16, 16, 16, 16, 16 }; /* we can now use aligned AVX to manipulate with surfaces */
int ii;
BOOL can_flip;
WORD heap;
diff --git a/makefile b/makefile
index 9324d8a..84a1973 100644
--- a/makefile
+++ b/makefile
@@ -12,7 +12,7 @@ OBJS += &
INCS = -I$(%WATCOM)\h\win -Iddk -Ivmware
-VER_BUILD = 72
+VER_BUILD = 73
FLAGS = -DDRV_VER_BUILD=$(VER_BUILD)
diff --git a/vxd_lib.c b/vxd_lib.c
index 363ade9..2e53cbb 100644
--- a/vxd_lib.c
+++ b/vxd_lib.c
@@ -155,8 +155,6 @@ DWORD Get_VMM_Version()
return ver;
}
-static DWORD cs_count = 0;
-
volatile void __cdecl Begin_Critical_Section(ULONG Flags)
{
static ULONG sFlags;
diff --git a/vxd_mouse.c b/vxd_mouse.c
index be4b7b1..92c7ca0 100644
--- a/vxd_mouse.c
+++ b/vxd_mouse.c
@@ -99,6 +99,8 @@ BOOL mouse_load()
CURSORSHAPE *cur;
DWORD cbw;
+ dbg_printf(dbg_mouse_load);
+
if(!mouse_buffer_mem) return FALSE;
#ifdef SVGA
@@ -151,6 +153,7 @@ BOOL mouse_load()
mouse_xormask_data == NULL ||
mouse_swap_data == NULL)
{
+ dbg_printf(dbg_mouse_no_mem);
FBHDA_access_end(0);
return FALSE;
}
@@ -186,6 +189,8 @@ BOOL mouse_load()
mouse_visible = TRUE;
mouse_empty = cursor_is_empty();
+ dbg_printf(dbg_mouse_status, mouse_valid, mouse_visible, mouse_empty);
+
//dbg_printf(dbg_cursor_empty, mouse_empty);
/* blit new cursor */
@@ -198,6 +203,8 @@ BOOL mouse_load()
void mouse_move(int x, int y)
{
+ dbg_printf(dbg_mouse_move, x, y);
+
#ifdef SVGA
if(SVGA_mouse_hw())
{
@@ -222,6 +229,8 @@ void mouse_move(int x, int y)
void mouse_show()
{
+ dbg_printf(dbg_mouse_show);
+
#ifdef SVGA
if(SVGA_mouse_hw())
{
@@ -229,14 +238,17 @@ void mouse_show()
return;
}
#endif
-
+ FBHDA_access_begin(0);
mouse_visible = TRUE;
+ FBHDA_access_end(0);
mouse_notify_accel();
}
void mouse_hide()
{
+ dbg_printf(dbg_mouse_hide);
+
#ifdef SVGA
if(SVGA_mouse_hw())
{
@@ -254,6 +266,8 @@ void mouse_hide()
void mouse_invalidate()
{
+ dbg_printf(dbg_mouse_invalidate);
+
#ifdef SVGA
if(SVGA_mouse_hw())
{
diff --git a/vxd_strings.h b/vxd_strings.h
index aa22a6a..3c9784b 100644
--- a/vxd_strings.h
+++ b/vxd_strings.h
@@ -180,6 +180,16 @@ DSTR(dbg_cb_valid_status, " -> status = %ld\n");
DSTR(dbg_trace_insert, "<= %lX\n");
DSTR(dbg_trace_remove, " => %lX\n");
+DSTR(dbg_mouse_invalidate, "MOUSE = invalidate\n");
+DSTR(dbg_mouse_load, "MOUSE = load ");
+DSTR(dbg_mouse_move, "MOUSE = xy(%ld, %ld)\n");
+
+DSTR(dbg_mouse_no_mem, "no mem\n");
+DSTR(dbg_mouse_status, " valid=%ld, visible=%ld, empty=%ld\n");
+
+DSTR(dbg_mouse_hide, "MOUSE = hide\n");
+DSTR(dbg_mouse_show, "MOUSE = show\n");
+
#undef DSTR
#endif
diff --git a/vxd_svga_cb.c b/vxd_svga_cb.c
index 47ac8f4..b6e80eb 100644
--- a/vxd_svga_cb.c
+++ b/vxd_svga_cb.c
@@ -553,9 +553,6 @@ void SVGA_CMB_submit(DWORD FBPTR cmb, DWORD cmb_size, SVGA_CMB_status_t FBPTR st
if(flags & SVGA_CB_SYNC)
{
WAIT_FOR_CB(cb, 0);
-#ifdef DBGPRINT
- CB_queue_valid(cb, dbg_err_pop);
-#endif
if(cb->status != SVGA_CB_STATUS_COMPLETED)
{
diff --git a/vxd_svga_mem.c b/vxd_svga_mem.c
index 95ee53d..8476353 100644
--- a/vxd_svga_mem.c
+++ b/vxd_svga_mem.c
@@ -142,7 +142,7 @@ static DWORD PT_count(DWORD size)
pt1_entries = RoundToPages(size);
pt2_entries = ((pt1_entries + PTONPAGE - 1)/PTONPAGE);
- dbg_printf(dbg_pt_build_2, size, pt1_entries, pt2_entries);
+// dbg_printf(dbg_pt_build_2, size, pt1_entries, pt2_entries);
if(pt2_entries > 1)
{
@@ -227,7 +227,7 @@ static void PT_build(DWORD size, void *buf, DWORD *outBase, DWORD *outType, void
}
}
- dbg_printf(dbg_pt_build, size, *outBase, *outType, *outUserPtr);
+// dbg_printf(dbg_pt_build, size, *outBase, *outType, *outUserPtr);
}
/**
@@ -268,7 +268,7 @@ void SVGA_OTable_alloc(BOOL screentargets)
if(ptr)
{
- dbg_printf(dbg_mob_allocate, i);
+// dbg_printf(dbg_mob_allocate, i);
PT_build(entry->size, ptr, &entry->ppn, &entry->pt_depth, &entry->lin);
entry->flags |= SVGA_OT_FLAG_ALLOCATED;
@@ -386,7 +386,7 @@ static void cache_delete(int index)
if(rinfo->region_address != NULL)
{
- dbg_printf(dbg_pagefree, rinfo->region_address);
+// dbg_printf(dbg_pagefree, rinfo->region_address);
_PageFree((PVOID)rinfo->region_address, 0);
}
else
@@ -396,12 +396,12 @@ static void cache_delete(int index)
if(rinfo->mob_address != NULL)
{
- dbg_printf(dbg_pagefree, rinfo->mob_address);
+// dbg_printf(dbg_pagefree, rinfo->mob_address);
_PageFree((PVOID)rinfo->mob_address, 0);
}
else
{
- dbg_printf(dbg_pagefree, free_ptr);
+// dbg_printf(dbg_pagefree, free_ptr);
_PageFree((PVOID)free_ptr, 0);
}
@@ -492,7 +492,7 @@ static BOOL cache_insert(SVGA_region_info_t *region)
else
cache_state.cnt_small++;
- dbg_printf(dbg_cache_insert, region->region_id, region->size);
+// dbg_printf(dbg_cache_insert, region->region_id, region->size);
}
return rc;
@@ -511,7 +511,7 @@ static BOOL cache_use(SVGA_region_info_t *region)
return FALSE;
}
- dbg_printf(dbg_cache_search, region->size);
+// dbg_printf(dbg_cache_search, region->size);
for(i = cache_state.free_index_max-1; i >= 0; i--)
{
@@ -536,7 +536,7 @@ static BOOL cache_use(SVGA_region_info_t *region)
{
if(++cache_state.spare_region[i].missed >= CACHE_THRESHOLD)
{
- dbg_printf(dbg_cache_delete, cache_state.spare_region[i].region.size);
+// dbg_printf(dbg_cache_delete, cache_state.spare_region[i].region.size);
cache_delete(i);
}
}
@@ -757,7 +757,7 @@ BOOL SVGA_region_create(SVGA_region_info_t *rinfo)
// number of pages including pages-cross descriptors
blk_pages = (blocks + blk_pages_raw + MDONPAGE - 1)/MDONPAGE;
- dbg_printf(dbg_region_1, blocks+blk_pages_raw, SVGA_ReadReg(SVGA_REG_GMR_MAX_DESCRIPTOR_LENGTH));
+// dbg_printf(dbg_region_1, blocks+blk_pages_raw, SVGA_ReadReg(SVGA_REG_GMR_MAX_DESCRIPTOR_LENGTH));
/* allocate memory for GMR descriptor */
pgblk = _PageAllocate(blk_pages, pa_type, pa_vm, pa_align, 0x0, 0x100000, NULL, pa_flags);
@@ -805,7 +805,7 @@ BOOL SVGA_region_create(SVGA_region_info_t *rinfo)
desc->ppn = 0;
desc->numPages = 0;
- dbg_printf(dbg_region_2, blocks);
+// dbg_printf(dbg_region_2, blocks);
}
rinfo->mob_address = (void*)maddr;
@@ -885,7 +885,7 @@ BOOL SVGA_region_create(SVGA_region_info_t *rinfo)
svga_db->stat_regions_usage += rinfo->size;
- dbg_printf(dbg_gmr_succ, rinfo->region_id, rinfo->size);
+// dbg_printf(dbg_gmr_succ, rinfo->region_id, rinfo->size);
return TRUE;
}
@@ -919,14 +919,7 @@ void SVGA_region_free(SVGA_region_info_t *rinfo)
}
else
{
- if(async_mobs == 1)
- {
- SVGA_CMB_submit(mobcb, cmdoff, NULL, SVGA_CB_SYNC, 0);
- }
- else
- {
- SVGA_CMB_submit(mobcb, cmdoff, NULL, 0, 0);
- }
+ SVGA_CMB_submit(mobcb, cmdoff, NULL, SVGA_CB_SYNC, 0);
}
}
diff --git a/vxd_svga_mouse.c b/vxd_svga_mouse.c
index 375d42d..f564847 100644
--- a/vxd_svga_mouse.c
+++ b/vxd_svga_mouse.c
@@ -217,7 +217,7 @@ void SVGA_mouse_move(int x, int y)
gSVGA.fifoMem[SVGA_FIFO_CURSOR_COUNT]++;
}
- dbg_printf(dbg_hw_mouse_move, x, y, hw_cursor_visible, hw_cursor_valid);
+// dbg_printf(dbg_hw_mouse_move, x, y, hw_cursor_visible, hw_cursor_valid);
mouse_last_x = x;
mouse_last_y = y;
@@ -225,7 +225,7 @@ void SVGA_mouse_move(int x, int y)
void SVGA_mouse_show()
{
- dbg_printf(dbg_hw_mouse_show, hw_cursor_valid);
+// dbg_printf(dbg_hw_mouse_show, hw_cursor_valid);
if(hw_cursor_valid)
{
hw_cursor_visible = TRUE;
@@ -235,7 +235,7 @@ void SVGA_mouse_show()
void SVGA_mouse_hide(BOOL invalidate)
{
- dbg_printf(dbg_hw_mouse_hide);
+// dbg_printf(dbg_hw_mouse_hide);
gSVGA.fifoMem[SVGA_FIFO_CURSOR_SCREEN_ID] = 0;
gSVGA.fifoMem[SVGA_FIFO_CURSOR_ON] = 0;