Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pbkit: Enable flip stall; expose ramin, print_char, depth buffer internals #628

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions lib/pbkit/pbkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static DWORD pb_FBVFlag;
static DWORD pb_GPUFrameBuffersFormat;//encoded format for GPU
static DWORD pb_EXAddr[8]; //extra buffers addresses
static DWORD pb_ExtraBuffersCount=0;
static DWORD pb_FBSizeMultiplier = 1;

static DWORD pb_DepthStencilAddr;
static DWORD pb_DepthStencilPitch;
Expand Down Expand Up @@ -2630,6 +2631,11 @@ void pb_set_color_format(unsigned int fmt, bool swizzled) {
assert(swizzled == false);
}

void pb_set_fb_size_multiplier(unsigned int multiplier) {
assert(multiplier > 0);
pb_FBSizeMultiplier = multiplier;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would you use this?

}

int pb_init(void)
{
DWORD old;
Expand Down Expand Up @@ -2739,7 +2745,6 @@ int pb_init(void)

pb_FrameBuffersAddr=0;


pb_DmaBuffer8=MmAllocateContiguousMemoryEx(32,0,MAXRAM,0,4);
pb_DmaBuffer2=MmAllocateContiguousMemoryEx(32,0,MAXRAM,0,4);
pb_DmaBuffer7=MmAllocateContiguousMemoryEx(32,0,MAXRAM,0,4);
Expand Down Expand Up @@ -3391,7 +3396,7 @@ int pb_init(void)
}
}

Size=Pitch*VSize;
Size=Pitch*VSize*pb_FBSizeMultiplier;

//verify 64 bytes alignment for size of a frame buffer
if (Size&(64-1)) debugPrint("pb_init: FBSize is not well aligned.\n");
Expand Down Expand Up @@ -3464,7 +3469,7 @@ int pb_init(void)
}
}

Size=Pitch*VSize;
Size=Pitch*VSize*pb_FBSizeMultiplier;

//verify 64 bytes alignment for size of a frame buffer
if (Size&(64-1)) debugPrint("pb_init: DSSize is not well aligned.\n");
Expand Down Expand Up @@ -3518,7 +3523,7 @@ int pb_init(void)
}
}

Size=Pitch*VSize;
Size=Pitch*VSize*pb_FBSizeMultiplier;

//verify 64 bytes alignment for size of a frame buffer
if (Size&(64-1)) debugPrint("pb_init: EXSize is not well aligned.\n");
Expand Down
2 changes: 2 additions & 0 deletions lib/pbkit/pbkit.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ void pb_fill(int x,int y,int w,int h, DWORD color); //rectangle fill

void pb_set_viewport(int dwx,int dwy,int width,int height,float zmin,float zmax);

void pb_set_fb_size_multiplier(unsigned int multiplier);

int pb_busy(void);


Expand Down