summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/powervr2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/powervr2.h')
-rw-r--r--src/mame/video/powervr2.h52
1 files changed, 36 insertions, 16 deletions
diff --git a/src/mame/video/powervr2.h b/src/mame/video/powervr2.h
index 19908a736c6..0fe9c2beb67 100644
--- a/src/mame/video/powervr2.h
+++ b/src/mame/video/powervr2.h
@@ -305,6 +305,13 @@ public:
void pvr_scanline_timer(int vpos);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ typedef uint32_t(powervr2_device::*pix_sample_fn)(texinfo*,float,float,uint32_t,uint32_t);
+
+ inline uint32_t sample_nontextured(texinfo *ti, float u, float v, uint32_t offset_color, uint32_t base_color);
+
+ template <int tsinst, bool bilinear>
+ inline uint32_t sample_textured(texinfo *ti, float u, float v, uint32_t offset_color, uint32_t base_color);
+
protected:
virtual void device_start() override;
virtual void device_reset() override;
@@ -462,23 +469,36 @@ private:
uint32_t tex_r_default(texinfo *t, float x, float y);
void tex_get_info(texinfo *t);
- void render_hline(bitmap_rgb32 &bitmap, texinfo *ti, int y, float xl, float xr, float ul, float ur, float vl, float vr, float wl, float wr, float const bl[4], float const br[4], float const offl[4], float const offr[4]);
- void render_span(bitmap_rgb32 &bitmap, texinfo *ti,
- float y0, float y1,
- float xl, float xr,
- float ul, float ur,
- float vl, float vr,
- float wl, float wr,
- float const bl[4], float const br[4],
- float const offl[4], float const offr[4],
- float dxldy, float dxrdy,
- float duldy, float durdy,
- float dvldy, float dvrdy,
- float dwldy, float dwrdy,
- float const dbldy[4], float const dbrdy[4],
- float const doldy[4], float const dordy[4]);
+ template <pix_sample_fn sample_fn>
+ inline void render_hline(bitmap_rgb32 &bitmap, texinfo *ti,
+ int y, float xl, float xr,
+ float ul, float ur, float vl, float vr,
+ float wl, float wr,
+ float const bl[4], float const br[4],
+ float const offl[4], float const offr[4]);
+
+ template <pix_sample_fn sample_fn>
+ inline void render_span(bitmap_rgb32 &bitmap, texinfo *ti,
+ float y0, float y1,
+ float xl, float xr,
+ float ul, float ur,
+ float vl, float vr,
+ float wl, float wr,
+ float const bl[4], float const br[4],
+ float const offl[4], float const offr[4],
+ float dxldy, float dxrdy,
+ float duldy, float durdy,
+ float dvldy, float dvrdy,
+ float dwldy, float dwrdy,
+ float const dbldy[4], float const dbrdy[4],
+ float const doldy[4], float const dordy[4]);
+
+ template <pix_sample_fn sample_fn>
+ inline void render_tri_sorted(bitmap_rgb32 &bitmap, texinfo *ti,
+ const vert *v0,
+ const vert *v1, const vert *v2);
+
void sort_vertices(const vert *v, int *i0, int *i1, int *i2);
- void render_tri_sorted(bitmap_rgb32 &bitmap, texinfo *ti, const vert *v0, const vert *v1, const vert *v2);
void render_tri(bitmap_rgb32 &bitmap, texinfo *ti, const vert *v);
void render_to_accumulation_buffer(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void pvr_accumulationbuffer_to_framebuffer(address_space &space, int x, int y);