diff options
Diffstat (limited to 'src/mame/video/powervr2.h')
-rw-r--r-- | src/mame/video/powervr2.h | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/src/mame/video/powervr2.h b/src/mame/video/powervr2.h index 0fe9c2beb67..702f2233934 100644 --- a/src/mame/video/powervr2.h +++ b/src/mame/video/powervr2.h @@ -112,16 +112,48 @@ public: texinfo ti; }; - struct receiveddata { - vert verts[65536]; - strip strips[65536]; + static const unsigned MAX_VERTS = 65536; + static const unsigned MAX_STRIPS = 65536; + + /* + * There are five polygon lists: + * + * Opaque + * Punch-through polygon + * Opaque/punch-through modifier volume + * Translucent + * Translucent modifier volume + * + * They are rendered in that order. List indices are are three bits, so + * technically there are 8 polygon lists, but only the first 5 are valid. + */ + enum { + DISPLAY_LIST_OPAQUE, + DISPLAY_LIST_OPAQUE_MOD, + DISPLAY_LIST_TRANS, + DISPLAY_LIST_TRANS_MOD, + DISPLAY_LIST_PUNCH_THROUGH, + DISPLAY_LIST_LAST, - int verts_size, strips_size; + DISPLAY_LIST_COUNT, + + DISPLAY_LIST_NONE = -1 + }; + + struct poly_group { + strip strips[MAX_STRIPS]; + int strips_size; + }; + + struct receiveddata { + vert verts[MAX_VERTS]; + struct poly_group groups[DISPLAY_LIST_COUNT]; uint32_t ispbase; uint32_t fbwsof1; uint32_t fbwsof2; int busy; int valid; + int verts_size; }; enum { @@ -500,6 +532,7 @@ private: void sort_vertices(const vert *v, int *i0, int *i1, int *i2); void render_tri(bitmap_rgb32 &bitmap, texinfo *ti, const vert *v); + void render_group_to_accumulation_buffer(bitmap_rgb32 &bitmap, const rectangle &cliprect, int group_no); void render_to_accumulation_buffer(bitmap_rgb32 &bitmap, const rectangle &cliprect); void pvr_accumulationbuffer_to_framebuffer(address_space &space, int x, int y); void pvr_drawframebuffer(bitmap_rgb32 &bitmap,const rectangle &cliprect); |