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

Debug empty draw #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion hw/xbox/mcpx_apu.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,10 @@ static void se_frame(void *opaque)
NV_PAVS_VOICE_PAR_STATE,
NV_PAVS_VOICE_PAR_STATE_ACTIVE_VOICE)) {
MCPX_DPRINTF("voice %d not active...!\n", d->regs[current]);
fe_method(d, SE2FE_IDLE_VOICE, d->regs[current]);
} else {
process_voice(d, mixbins, d->regs[current]);
}
fe_method(d, SE2FE_IDLE_VOICE, d->regs[current]);
MCPX_DPRINTF("next voice %d\n", d->regs[next]);
d->regs[current] = d->regs[next];
}
Expand Down
2 changes: 1 addition & 1 deletion hw/xbox/nv2a/nv2a_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# define NV2A_DPRINTF(format, ...) do { } while (0)
#endif

// #define DEBUG_NV2A_GL
#define DEBUG_NV2A_GL
#ifdef DEBUG_NV2A_GL

#include <stdbool.h>
Expand Down
2 changes: 2 additions & 0 deletions hw/xbox/nv2a/nv2a_pfifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ static void pfifo_run_pusher(NV2AState *d)

// NV2A_DPRINTF("push %d 0x%x 0x%x - subch %d\n", put/4, method_entry, word, method_subchannel);

printf("Moving 0x%08X / 0x%08X: 0x%04X = 0x%08X\n", dma_get_v, dma_put_v, method_entry, word);

assert(put < 128*4 && (put%4) == 0);
d->pfifo.regs[NV_PFIFO_CACHE1_METHOD + put*2] = method_entry;
d->pfifo.regs[NV_PFIFO_CACHE1_DATA + put*2] = word;
Expand Down
8 changes: 7 additions & 1 deletion hw/xbox/nv2a/nv2a_pgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,11 @@ static void pgraph_method(NV2AState *d,
} break; }


case NV_KELVIN_PRIMITIVE: { switch (method) {
case NV_KELVIN_PRIMITIVE: {

printf("method: 0x%04X: 0x%08X\n", method, parameter);

switch (method) {
case NV097_SET_OBJECT:
kelvin->object_instance = parameter;
break;
Expand Down Expand Up @@ -3579,11 +3583,13 @@ static void pgraph_bind_textures(NV2AState *d)
default: assert(false); break;
}

#if 0
/* Check for unsupported features */
assert(!(filter & NV_PGRAPH_TEXFILTER0_ASIGNED));
assert(!(filter & NV_PGRAPH_TEXFILTER0_RSIGNED));
assert(!(filter & NV_PGRAPH_TEXFILTER0_GSIGNED));
assert(!(filter & NV_PGRAPH_TEXFILTER0_BSIGNED));
#endif

glActiveTexture(GL_TEXTURE0 + i);
if (!enabled) {
Expand Down