-
Notifications
You must be signed in to change notification settings - Fork 68
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
base: master
Are you sure you want to change the base?
Conversation
@@ -2468,7 +2468,7 @@ int pb_finished(void) | |||
p=pb_push1(p,NV20_TCL_PRIMITIVE_3D_WAIT_MAKESPACE,0); //wait/makespace (obtains null status) | |||
p=pb_push1(p,NV20_TCL_PRIMITIVE_3D_PARAMETER_A,pb_back_index); //set param=back buffer index to show up | |||
p=pb_push1(p,NV20_TCL_PRIMITIVE_3D_FIRE_INTERRUPT,PB_FINISHED); //subprogID PB_FINISHED: gets frame ready to show up soon | |||
// p=pb_push1(p,NV20_TCL_PRIMITIVE_3D_STALL_PIPELINE,0); //stall gpu pipeline (not sure it's needed in triple buffering technic) | |||
p=pb_push1(p,NV20_TCL_PRIMITIVE_3D_STALL_PIPELINE,0); //stall gpu pipeline (not sure it's needed in triple buffering technic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
@@ -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; |
There was a problem hiding this comment.
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?
lib/pbkit/pbkit.h
Outdated
@@ -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. |
There was a problem hiding this comment.
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?
@@ -144,6 +144,10 @@ void pb_create_gr_ctx( int ChannelID, | |||
struct s_CtxDma *pGrObject ); | |||
void pb_bind_channel(struct s_CtxDma *pCtxDmaObject); | |||
|
|||
uint8_t *pb_depth_stencil_buffer(); | |||
DWORD pb_depth_stencil_pitch(); | |||
DWORD pb_depth_stencil_size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always thought pbkit had this interface backwards. Currently pbkit is a mix of a low-level and high-level driver.
pbkit can submit pushbuffers, but it also constructs them, some using rather high level operations.
Instead, I believe that pbkit should allow submission of pushbuffers, but it should primarily be the users responsibility to construct them.
pbkit should only control the hardware so it can process commands from the pushbuffers.
More importantly, pbkit also manages buffers internally (sometimes like a singleton), but doesn't allow the user to manually create or control these buffers.
Instead, I believe that pbkit should provide the user with buffer creation / managing functions, but the user should always explicitly create these buffers and keep track of them.
This means I'd prefer to see something like pb_create_depth_stencil_buffer(size, pitch)
and then the user should be responsible for creating these buffers.
So, in an ideal world, the application would never even have to query for the buffer address / pitch / size, because it created the buffer itself.
This (explicit buffer creation by application) is also required (or at least helpful) for more advanced applications which want to switch render-targets.
Commit titles don't follow our usual style ( |
This PR upstreams the pbkit changes required by the pgraph test suite.
They are all combined into one PR, but can be split it if preferred.
CC: @abaire