summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdcore.cpp
diff options
context:
space:
mode:
author Aaron Giles <aaronsgiles@users.noreply.github.com>2021-07-08 18:35:00 -0700
committer GitHub <noreply@github.com>2021-07-09 11:35:00 +1000
commit6ffc98289c9466cb01941c05a5b3088ac022a0b6 (patch)
tree62bc23850838f7f48d47f555292ea409f15f51ae /src/osd/osdcore.cpp
parente9a86fc9fe55d45265b39fa7368e1645629aa314 (diff)
video/voodoo.cpp: Major rewrite: (#8267)
* Changed to use modern poly.h instead of polylgcy.h. * Moved helper classes into separate voodoo namespace. * Derived device classes from video_device_interface. * Split classes so that later versions derive from earlier versions. * Created device maps to be directly included. * Redesigned register mapping to use helper classes and delegates. * Rewrote rasterizers to use C++ templates instead of macros. * Added logic to compute equations for color/texture combine units. * Added special generic identity-texel rasterizer cases. * Removed pipeline stalls on texture and palette changes. * Removed pipeline stalls on most all parameter changes. * Generally re-thought and cleaned up logic throughout. * Parameterized cycle stealing on status reads; updated all existing voodoo consumers to configure it as it was before. -vidoe/poly.h: Various improvements: * Exposed poly_array class for broader use. * Changed poly_array to intelligently determine maximum size. * Added logic to track multiple "last" instances in poly_array. * Extended logic to support up to 16m work items. * Removed MaxPolys parameter from poly_manager template. * Added Flags parameter to poly_manager template. * Added POLY_FLAG_NO_CLIPPING flag to remove clipping code when not needed. * poly_manager now supports a MaxParams value of 0. * Made paramcount a template parameter for render_* functions. * Added reset_after_wait() method to be overridden by derived classes. * Switched to using std:: helpers instead of internal methods. * Removed useless dependency on screen_device. * TRACK_POLY_WAITS now produces more complete statistics. -video/polylgcy.cpp: Removed legacy implementation of polygon renderer. -machine/gt64xxx.cpp: Prevent lockups by disallowing 0-duration timers. -machine/pci.cpp: Added support for adding subdevice maps directly. -emu/video/rgbsse.h: Improved min/max for SSE4.1+ and scale+clamp operations for all. -emu/vidoe/rgbutil.h: Made palette expansion constexpr and added argbexpand function. -osd/osdcore.cpp: Changed osd_ticks to use QueryPerformanceCounter on Windows since the mingw std::chrono::high_resolution_clock is anything but.
Diffstat (limited to 'src/osd/osdcore.cpp')
-rw-r--r--src/osd/osdcore.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/osd/osdcore.cpp b/src/osd/osdcore.cpp
index fd696706e6b..51a9aaf207c 100644
--- a/src/osd/osdcore.cpp
+++ b/src/osd/osdcore.cpp
@@ -139,7 +139,13 @@ void osd_vprintf_debug(util::format_argument_pack<std::ostream> const &args)
osd_ticks_t osd_ticks()
{
+#ifdef WIN32
+ LARGE_INTEGER val;
+ QueryPerformanceCounter(&val);
+ return val.QuadPart;
+#else
return std::chrono::high_resolution_clock::now().time_since_epoch().count();
+#endif
}
@@ -149,7 +155,13 @@ osd_ticks_t osd_ticks()
osd_ticks_t osd_ticks_per_second()
{
+#ifdef WIN32
+ LARGE_INTEGER val;
+ QueryPerformanceFrequency(&val);
+ return val.QuadPart;
+#else
return std::chrono::high_resolution_clock::period::den / std::chrono::high_resolution_clock::period::num;
+#endif
}
//============================================================