renamed old poly_manager to legacy_poly_manager

This commit is contained in:
Oliver Stöneberg 2014-03-19 13:31:50 +00:00
parent bfde3d514b
commit b018751a9a
14 changed files with 39 additions and 40 deletions

View File

@ -123,7 +123,7 @@ union work_unit
/* polygon_info describes a single polygon, which includes the poly_params */ /* polygon_info describes a single polygon, which includes the poly_params */
struct polygon_info struct polygon_info
{ {
poly_manager * poly; /* pointer back to the poly manager */ legacy_poly_manager * poly; /* pointer back to the poly manager */
void * dest; /* pointer to the destination we are rendering to */ void * dest; /* pointer to the destination we are rendering to */
void * extra; /* extra data pointer */ void * extra; /* extra data pointer */
UINT8 numparams; /* number of parameters for this polygon */ UINT8 numparams; /* number of parameters for this polygon */
@ -136,7 +136,7 @@ struct polygon_info
/* full poly manager description */ /* full poly manager description */
struct poly_manager struct legacy_poly_manager
{ {
/* queue management */ /* queue management */
osd_work_queue * queue; /* work queue */ osd_work_queue * queue; /* work queue */
@ -194,7 +194,7 @@ struct poly_manager
static void **allocate_array(running_machine &machine, size_t *itemsize, UINT32 itemcount); static void **allocate_array(running_machine &machine, size_t *itemsize, UINT32 itemcount);
static void *poly_item_callback(void *param, int threadid); static void *poly_item_callback(void *param, int threadid);
static void poly_state_presave(poly_manager *poly); static void poly_state_presave(legacy_poly_manager *poly);
@ -274,7 +274,7 @@ INLINE void copy_vertex(poly_vertex *outv, const poly_vertex *v, int paramcount)
object, blocking if we run out object, blocking if we run out
-------------------------------------------------*/ -------------------------------------------------*/
INLINE polygon_info *allocate_polygon(poly_manager *poly, int miny, int maxy) INLINE polygon_info *allocate_polygon(legacy_poly_manager *poly, int miny, int maxy)
{ {
/* wait for a work item if we have to */ /* wait for a work item if we have to */
if (poly->polygon_next + 1 > poly->polygon_count) if (poly->polygon_next + 1 > poly->polygon_count)
@ -308,12 +308,12 @@ INLINE polygon_info *allocate_polygon(poly_manager *poly, int miny, int maxy)
manager manager
-------------------------------------------------*/ -------------------------------------------------*/
poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags) legacy_poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags)
{ {
poly_manager *poly; legacy_poly_manager *poly;
/* allocate the manager itself */ /* allocate the manager itself */
poly = auto_alloc_clear(machine, poly_manager); poly = auto_alloc_clear(machine, legacy_poly_manager);
poly->flags = flags; poly->flags = flags;
/* allocate polygons */ /* allocate polygons */
@ -348,7 +348,7 @@ poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_d
poly_free - free a polygon manager poly_free - free a polygon manager
-------------------------------------------------*/ -------------------------------------------------*/
void poly_free(poly_manager *poly) void poly_free(legacy_poly_manager *poly)
{ {
#if KEEP_STATISTICS #if KEEP_STATISTICS
{ {
@ -387,7 +387,7 @@ void poly_free(poly_manager *poly)
to complete to complete
-------------------------------------------------*/ -------------------------------------------------*/
void poly_wait(poly_manager *poly, const char *debug_reason) void poly_wait(legacy_poly_manager *poly, const char *debug_reason)
{ {
osd_ticks_t time; osd_ticks_t time;
@ -431,7 +431,7 @@ void poly_wait(poly_manager *poly, const char *debug_reason)
extra data for the next polygon extra data for the next polygon
-------------------------------------------------*/ -------------------------------------------------*/
void *poly_get_extra_data(poly_manager *poly) void *poly_get_extra_data(legacy_poly_manager *poly)
{ {
/* wait for a work item if we have to */ /* wait for a work item if we have to */
if (poly->extra_next + 1 > poly->extra_count) if (poly->extra_next + 1 > poly->extra_count)
@ -460,7 +460,7 @@ void *poly_get_extra_data(poly_manager *poly)
triangle given 3 vertexes triangle given 3 vertexes
-------------------------------------------------*/ -------------------------------------------------*/
UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3) UINT32 poly_render_triangle(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3)
{ {
float dxdy_v1v2, dxdy_v1v3, dxdy_v2v3; float dxdy_v1v2, dxdy_v1v3, dxdy_v2v3;
const poly_vertex *tv; const poly_vertex *tv;
@ -643,7 +643,7 @@ UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle &cli
triangles in a fan triangles in a fan
-------------------------------------------------*/ -------------------------------------------------*/
UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v) UINT32 poly_render_triangle_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
{ {
UINT32 pixels = 0; UINT32 pixels = 0;
int vertnum; int vertnum;
@ -660,7 +660,7 @@ UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle
render of an object, given specific extents render of an object, given specific extents
-------------------------------------------------*/ -------------------------------------------------*/
UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents) UINT32 poly_render_triangle_custom(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents)
{ {
INT32 curscan, scaninc; INT32 curscan, scaninc;
polygon_info *polygon; polygon_info *polygon;
@ -756,7 +756,7 @@ UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectang
given 4 vertexes given 4 vertexes
-------------------------------------------------*/ -------------------------------------------------*/
UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4) UINT32 poly_render_quad(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4)
{ {
poly_edge fedgelist[3], bedgelist[3]; poly_edge fedgelist[3], bedgelist[3];
const poly_edge *ledge, *redge; const poly_edge *ledge, *redge;
@ -976,7 +976,7 @@ UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle &cliprec
quads in a fan quads in a fan
-------------------------------------------------*/ -------------------------------------------------*/
UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v) UINT32 poly_render_quad_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
{ {
UINT32 pixels = 0; UINT32 pixels = 0;
int vertnum; int vertnum;
@ -998,7 +998,7 @@ UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle &cli
to 32 vertices to 32 vertices
-------------------------------------------------*/ -------------------------------------------------*/
UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v) UINT32 poly_render_polygon(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v)
{ {
poly_edge fedgelist[MAX_POLYGON_VERTS - 1], bedgelist[MAX_POLYGON_VERTS - 1]; poly_edge fedgelist[MAX_POLYGON_VERTS - 1], bedgelist[MAX_POLYGON_VERTS - 1];
const poly_edge *ledge, *redge; const poly_edge *ledge, *redge;
@ -1351,7 +1351,7 @@ static void *poly_item_callback(void *param, int threadid)
ensure everything is synced before saving ensure everything is synced before saving
-------------------------------------------------*/ -------------------------------------------------*/
static void poly_state_presave(poly_manager *poly) static void poly_state_presave(legacy_poly_manager *poly)
{ {
poly_wait(poly, "pre-save"); poly_wait(poly, "pre-save");
} }

View File

@ -55,7 +55,7 @@
***************************************************************************/ ***************************************************************************/
/* opaque reference to the poly manager */ /* opaque reference to the poly manager */
struct poly_manager; struct legacy_poly_manager;
/* input vertex data */ /* input vertex data */
@ -97,50 +97,50 @@ typedef void (*poly_draw_scanline_func)(void *dest, INT32 scanline, const poly_e
/* ----- initialization/teardown ----- */ /* ----- initialization/teardown ----- */
/* allocate a new poly manager that can render triangles */ /* allocate a new poly manager that can render triangles */
poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags); legacy_poly_manager *poly_alloc(running_machine &machine, int max_polys, size_t extra_data_size, UINT8 flags);
/* free a poly manager */ /* free a poly manager */
void poly_free(poly_manager *poly); void poly_free(legacy_poly_manager *poly);
/* ----- common functions ----- */ /* ----- common functions ----- */
/* wait until all polygons in the queue have been rendered */ /* wait until all polygons in the queue have been rendered */
void poly_wait(poly_manager *poly, const char *debug_reason); void poly_wait(legacy_poly_manager *poly, const char *debug_reason);
/* get a pointer to the extra data for the next polygon */ /* get a pointer to the extra data for the next polygon */
void *poly_get_extra_data(poly_manager *poly); void *poly_get_extra_data(legacy_poly_manager *poly);
/* ----- core triangle rendering ----- */ /* ----- core triangle rendering ----- */
/* render a single triangle given 3 vertexes */ /* render a single triangle given 3 vertexes */
UINT32 poly_render_triangle(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3); UINT32 poly_render_triangle(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3);
/* render a set of triangles in a fan */ /* render a set of triangles in a fan */
UINT32 poly_render_triangle_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v); UINT32 poly_render_triangle_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
/* perform a custom render of an object, given specific extents */ /* perform a custom render of an object, given specific extents */
UINT32 poly_render_triangle_custom(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents); UINT32 poly_render_triangle_custom(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int startscanline, int numscanlines, const poly_extent *extents);
/* ----- core quad rendering ----- */ /* ----- core quad rendering ----- */
/* render a single quad given 4 vertexes */ /* render a single quad given 4 vertexes */
UINT32 poly_render_quad(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4); UINT32 poly_render_quad(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, const poly_vertex *v1, const poly_vertex *v2, const poly_vertex *v3, const poly_vertex *v4);
/* render a set of quads in a fan */ /* render a set of quads in a fan */
UINT32 poly_render_quad_fan(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v); UINT32 poly_render_quad_fan(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);
/* ----- core polygon rendering ----- */ /* ----- core polygon rendering ----- */
/* render a single polygon up to 32 vertices */ /* render a single polygon up to 32 vertices */
UINT32 poly_render_polygon(poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v); UINT32 poly_render_polygon(legacy_poly_manager *poly, void *dest, const rectangle &cliprect, poly_draw_scanline_func callback, int paramcount, int numverts, const poly_vertex *v);

View File

@ -1715,7 +1715,7 @@ struct voodoo_state
tmu_shared_state tmushare; /* TMU shared state */ tmu_shared_state tmushare; /* TMU shared state */
banshee_info banshee; /* Banshee state */ banshee_info banshee; /* Banshee state */
poly_manager * poly; /* polygon manager */ legacy_poly_manager * poly; /* polygon manager */
stats_block * thread_stats; /* per-thread statistics */ stats_block * thread_stats; /* per-thread statistics */
voodoo_stats stats; /* internal statistics */ voodoo_stats stats; /* internal statistics */

View File

@ -40,7 +40,7 @@ public:
required_shared_ptr<UINT16> m_m68k_ram; required_shared_ptr<UINT16> m_m68k_ram;
UINT16 *m_shared_ram[2]; UINT16 *m_shared_ram[2];
required_shared_ptr<UINT16> m_screen_ram; required_shared_ptr<UINT16> m_screen_ram;
poly_manager *m_poly; legacy_poly_manager *m_poly;
DECLARE_WRITE16_MEMBER(gpu_w); DECLARE_WRITE16_MEMBER(gpu_w);
DECLARE_READ16_MEMBER(gpu_r); DECLARE_READ16_MEMBER(gpu_r);
DECLARE_READ16_MEMBER(m68k_shared_0_r); DECLARE_READ16_MEMBER(m68k_shared_0_r);

View File

@ -1331,7 +1331,7 @@ struct c404_t
struct render_t struct render_t
{ {
poly_manager *polymgr; legacy_poly_manager *polymgr;
int cur; int cur;
int poly_count; int poly_count;
int count[2]; int count[2];

View File

@ -55,7 +55,7 @@ public:
struct tempsprite *m_sprite_ptr_pre; struct tempsprite *m_sprite_ptr_pre;
bitmap_ind16 m_tmpbitmaps; bitmap_ind16 m_tmpbitmaps;
bitmap_ind16 m_polybitmap; bitmap_ind16 m_polybitmap;
poly_manager *m_poly; legacy_poly_manager *m_poly;
int m_rsxb; int m_rsxb;
int m_rsyb; int m_rsyb;
int m_rsxoffs; int m_rsxoffs;

View File

@ -95,7 +95,7 @@ public:
int m_jnet_time_out; int m_jnet_time_out;
UINT32 m_geo_read_start_address; UINT32 m_geo_read_start_address;
UINT32 m_geo_write_start_address; UINT32 m_geo_write_start_address;
poly_manager *m_poly; legacy_poly_manager *m_poly;
raster_state *m_raster; raster_state *m_raster;
geo_state *m_geo; geo_state *m_geo;
bitmap_rgb32 m_sys24_bitmap; bitmap_rgb32 m_sys24_bitmap;

View File

@ -101,7 +101,7 @@ public:
VECTOR3 m_parallel_light; VECTOR3 m_parallel_light;
float m_parallel_light_intensity; float m_parallel_light_intensity;
float m_ambient_light_intensity; float m_ambient_light_intensity;
poly_manager *m_poly; legacy_poly_manager *m_poly;
int m_list_depth; int m_list_depth;
int m_tick; int m_tick;
int m_debug_layer_disable; int m_debug_layer_disable;

View File

@ -12,7 +12,6 @@
#include "includes/gaelco3d.h" #include "includes/gaelco3d.h"
#include "cpu/tms32031/tms32031.h" #include "cpu/tms32031/tms32031.h"
#include "video/rgbutil.h" #include "video/rgbutil.h"
#include "video/poly.h"
#define MAX_POLYGONS 4096 #define MAX_POLYGONS 4096

View File

@ -213,7 +213,7 @@ static int *tex_mirror_table[2][8];
static int K001005_bitmap_page = 0; static int K001005_bitmap_page = 0;
static poly_manager *poly; static legacy_poly_manager *poly;
static poly_vertex prev_v[4]; static poly_vertex prev_v[4];
static UINT32 fog_r, fog_g, fog_b; static UINT32 fog_r, fog_g, fog_b;

View File

@ -77,7 +77,7 @@ private:
int m_bitmap_page; int m_bitmap_page;
poly_manager *m_poly; legacy_poly_manager *m_poly;
poly_vertex m_prev_v[4]; poly_vertex m_prev_v[4];
int m_prev_poly_type; int m_prev_poly_type;

View File

@ -57,7 +57,7 @@ struct poly_extra_data
* *
*************************************/ *************************************/
static poly_manager *poly; static legacy_poly_manager *poly;
static UINT8 log_fifo; static UINT8 log_fifo;
static UINT32 zeus_fifo[20]; static UINT32 zeus_fifo[20];

View File

@ -57,7 +57,7 @@ struct poly_extra_data
* *
*************************************/ *************************************/
static poly_manager *poly; static legacy_poly_manager *poly;
static UINT8 log_fifo; static UINT8 log_fifo;
static UINT32 zeus_fifo[20]; static UINT32 zeus_fifo[20];

View File

@ -924,7 +924,7 @@ static const poly_draw_scanline_func render_funcs[8] =
static void model2_3d_render( model2_state *state, bitmap_rgb32 &bitmap, triangle *tri, const rectangle &cliprect ) static void model2_3d_render( model2_state *state, bitmap_rgb32 &bitmap, triangle *tri, const rectangle &cliprect )
{ {
poly_manager *poly = state->m_poly; legacy_poly_manager *poly = state->m_poly;
poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(poly); poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(poly);
UINT8 renderer; UINT8 renderer;