Backport GPU Unai plugin from PCSX4ALL
[pcsx_rearmed.git] / plugins / gpu_unai / gpu.h
CommitLineData
86aad47b 1/***************************************************************************
2* Copyright (C) 2010 PCSX4ALL Team *
3* Copyright (C) 2010 Unai *
030d1121 4* Copyright (C) 2016 Senquack (dansilsby <AT> gmail <DOT> com) *
86aad47b 5* *
6* This program is free software; you can redistribute it and/or modify *
7* it under the terms of the GNU General Public License as published by *
8* the Free Software Foundation; either version 2 of the License, or *
9* (at your option) any later version. *
10* *
11* This program is distributed in the hope that it will be useful, *
12* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14* GNU General Public License for more details. *
15* *
16* You should have received a copy of the GNU General Public License *
17* along with this program; if not, write to the *
18* Free Software Foundation, Inc., *
19* 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
20***************************************************************************/
21
030d1121 22#ifndef GPU_UNAI_GPU_H
23#define GPU_UNAI_GPU_H
86aad47b 24
030d1121 25struct gpu_unai_config_t {
26 uint8_t pixel_skip:1; // If 1, allows skipping rendering pixels that
27 // would not be visible when a high horizontal
28 // resolution PS1 video mode is set.
29 // Only applies to devices with low resolutions
30 // like 320x240. Should not be used if a
31 // down-scaling framebuffer blitter is in use.
32 // Can cause gfx artifacts if game reads VRAM
33 // to do framebuffer effects.
86aad47b 34
030d1121 35 uint8_t ilace_force:3; // Option to force skipping rendering of lines,
36 // for very slow platforms. Value will be
37 // assigned to 'ilace_mask' in gpu_unai struct.
38 // Normally 0. Value '1' will skip rendering
39 // odd lines.
86aad47b 40
030d1121 41 uint8_t lighting:1;
42 uint8_t fast_lighting:1;
43 uint8_t blending:1;
44 uint8_t dithering:1;
86aad47b 45
030d1121 46 //senquack Only PCSX Rearmed's version of gpu_unai had this, and I
47 // don't think it's necessary. It would require adding 'AH' flag to
48 // gpuSpriteSpanFn() increasing size of sprite span function array.
49 //uint8_t enableAbbeyHack:1; // Abe's Odyssey hack
86aad47b 50
030d1121 51 ////////////////////////////////////////////////////////////////////////////
52 // Variables used only by older standalone version of gpu_unai (gpu.cpp)
53#ifndef USE_GPULIB
54 uint8_t prog_ilace:1; // Progressive interlace option (old option)
55 // This option was somewhat oddly named:
56 // When in interlaced video mode, on a low-res
57 // 320x240 device, only the even lines are
58 // rendered. This option will take that one
59 // step further and only render half the even
60 // even lines one frame, and then the other half.
61 uint8_t frameskip_count:3; // Frame skip (0..7)
62#endif
86aad47b 63};
64
030d1121 65extern gpu_unai_config_t gpu_unai_config_ext;
86aad47b 66
030d1121 67// TODO: clean up show_fps frontend option
68extern bool show_fps;
86aad47b 69
030d1121 70#endif // GPU_UNAI_GPU_H