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
19 changes: 12 additions & 7 deletions lib/pbkit/pbkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,11 +1331,11 @@ static void pb_prepare_tiles(void)



void pb_create_dma_ctx( DWORD ChannelID,
void pb_create_dma_ctx(DWORD ChannelID,
DWORD Class,
DWORD Base,
DWORD Limit,
struct s_CtxDma *pDmaObject )
struct s_CtxDma *pDmaObject)
{
DWORD Addr;
DWORD AddrSpace;
Expand Down Expand Up @@ -1611,7 +1611,8 @@ static void pb_3D_init(void)
#endif
}

DWORD pb_reserve_instance(DWORD size) {
DWORD pb_reserve_instance(DWORD size)
{
DWORD ret = pb_FreeInst;
pb_FreeInst += (size>>4);
return ret;
Expand Down Expand Up @@ -2626,12 +2627,14 @@ void pb_kill(void)
}


void pb_set_color_format(unsigned int fmt, bool swizzled) {
void pb_set_color_format(unsigned int fmt, bool swizzled)
{
pb_ColorFmt = fmt;
assert(swizzled == false);
}

void pb_set_fb_size_multiplier(unsigned int multiplier) {
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?

}
Expand Down Expand Up @@ -3737,10 +3740,12 @@ uint8_t* pb_depth_stencil_buffer()
return (uint8_t*)pb_DepthStencilAddr;
}

DWORD pb_depth_stencil_pitch() {
DWORD pb_depth_stencil_pitch()
{
return pb_DepthStencilPitch;
}

DWORD pb_depth_stencil_size() {
DWORD pb_depth_stencil_size()
{
return pb_DSSize;
}
8 changes: 3 additions & 5 deletions lib/pbkit/pbkit.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ void pb_create_dma_ctx(DWORD ChannelID,
DWORD Class,
DWORD Base,
DWORD Limit,
struct s_CtxDma *pDmaObject );
void pb_create_gr_ctx( int ChannelID,
struct s_CtxDma *pDmaObject);
void pb_create_gr_ctx(int ChannelID,
int Class,
struct s_CtxDma *pGrObject );
struct s_CtxDma *pGrObject);
void pb_bind_channel(struct s_CtxDma *pCtxDmaObject);

uint8_t *pb_depth_stencil_buffer();
Expand All @@ -159,8 +159,6 @@ void pb_create_gr_instance(int ChannelID,
DWORD flags3D,
struct s_CtxDma *pGrObject);

// Exposed so pb_print can be overridden using a version of vsprintf that
// supports floats.
Copy link
Member

Choose a reason for hiding this comment

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

Why was this comment removed?

void pb_print_char(char c);
#ifdef __cplusplus
}
Expand Down