mirror of https://github.com/xemu-project/xemu.git
wip
This commit is contained in:
parent
e5ab2476a9
commit
48323492ec
|
@ -2347,16 +2347,9 @@ DEF_METHOD(NV097, SET_EYE_DIRECTION)
|
|||
pg->ltctxa_dirty[NV_IGRAPH_XF_LTCTXA_EYED] = true;
|
||||
}
|
||||
|
||||
DEF_METHOD(NV097, SET_BEGIN_END)
|
||||
static void pgraph_flush_draw(NV2AState *d)
|
||||
{
|
||||
bool depth_test =
|
||||
pg->regs[NV_PGRAPH_CONTROL_0] & NV_PGRAPH_CONTROL_0_ZENABLE;
|
||||
bool stencil_test =
|
||||
pg->regs[NV_PGRAPH_CONTROL_1] & NV_PGRAPH_CONTROL_1_STENCIL_TEST_ENABLE;
|
||||
|
||||
if (parameter == NV097_SET_BEGIN_END_OP_END) {
|
||||
|
||||
nv2a_profile_inc_counter(NV2A_PROF_BEGIN_ENDS);
|
||||
PGRAPHState *pg = &d->pgraph;
|
||||
|
||||
assert(pg->shader_binding);
|
||||
|
||||
|
@ -2468,6 +2461,34 @@ DEF_METHOD(NV097, SET_BEGIN_END)
|
|||
NV2A_UNCONFIRMED("EMPTY NV097_SET_BEGIN_END");
|
||||
}
|
||||
|
||||
pg->inline_elements_length = 0;
|
||||
pg->inline_array_length = 0;
|
||||
pg->inline_buffer_length = 0;
|
||||
pg->draw_arrays_length = 0;
|
||||
pg->draw_arrays_min_start = -1;
|
||||
pg->draw_arrays_max_count = 0;
|
||||
|
||||
bool depth_test =
|
||||
pg->regs[NV_PGRAPH_CONTROL_0] & NV_PGRAPH_CONTROL_0_ZENABLE;
|
||||
bool stencil_test =
|
||||
pg->regs[NV_PGRAPH_CONTROL_1] & NV_PGRAPH_CONTROL_1_STENCIL_TEST_ENABLE;
|
||||
|
||||
pgraph_set_surface_dirty(pg, true, depth_test || stencil_test);
|
||||
}
|
||||
|
||||
DEF_METHOD(NV097, SET_BEGIN_END)
|
||||
{
|
||||
bool depth_test =
|
||||
pg->regs[NV_PGRAPH_CONTROL_0] & NV_PGRAPH_CONTROL_0_ZENABLE;
|
||||
bool stencil_test =
|
||||
pg->regs[NV_PGRAPH_CONTROL_1] & NV_PGRAPH_CONTROL_1_STENCIL_TEST_ENABLE;
|
||||
|
||||
if (parameter == NV097_SET_BEGIN_END_OP_END) {
|
||||
|
||||
nv2a_profile_inc_counter(NV2A_PROF_BEGIN_ENDS);
|
||||
|
||||
pgraph_flush_draw(d);
|
||||
|
||||
/* End of visibility testing */
|
||||
if (pg->zpass_pixel_count_enable) {
|
||||
nv2a_profile_inc_counter(NV2A_PROF_QUERY);
|
||||
|
@ -2849,6 +2870,13 @@ DEF_METHOD(NV097, DRAW_ARRAYS)
|
|||
unsigned int start = GET_MASK(parameter, NV097_DRAW_ARRAYS_START_INDEX);
|
||||
unsigned int count = GET_MASK(parameter, NV097_DRAW_ARRAYS_COUNT)+1;
|
||||
|
||||
/* FIXME */
|
||||
assert((pg->inline_elements_length+count) < NV2A_MAX_BATCH_LENGTH);
|
||||
for (unsigned int i = 0; i < count; i++) {
|
||||
pg->inline_elements[pg->inline_elements_length++] = start + i;
|
||||
}
|
||||
|
||||
#if 0
|
||||
pg->draw_arrays_min_start = MIN(pg->draw_arrays_min_start, start);
|
||||
pg->draw_arrays_max_count = MAX(pg->draw_arrays_max_count, start + count);
|
||||
|
||||
|
@ -2870,6 +2898,7 @@ DEF_METHOD(NV097, DRAW_ARRAYS)
|
|||
pg->gl_draw_arrays_count[pg->draw_arrays_length] = count;
|
||||
pg->draw_arrays_length++;
|
||||
pg->draw_arrays_prevent_connect = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
DEF_METHOD(NV097, INLINE_ARRAY)
|
||||
|
|
Loading…
Reference in New Issue