summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render
Commit message (Collapse)AuthorAgeFilesLines
* Various optimisations to code generaton. Vas Crabb2023-03-262-4/+4
| | | | | | | | | | | | | | | util/bitmap.cpp, util/palette.cpp: Marked lots of things constexpr. Bitmaps don't throw exceptions on allocation failure, they just become invalid. Almost nothing in MAME actually checks for this. emu/profiler.cpp: Abort if the profile stack overflows rather than throwing an exception. This is a developer feature and if it overflows, the code is broken. Calling a noreturn noexcept function generates less code than throwing an exception, which adds up. util/strformat.cpp: Traded away some unnecessary flexibility for more compact code. The stream objects must derive from std::basic_ostream now - they can't just be any old objects with the expected operators.
* Retired the over-stretched "system type" flags. Vas Crabb2023-03-231-1/+1
| | | | | | | | | | | | | | | | Functionally, the only difference between the system definitions is that GAMEL lets you specify an additional internal layout and SYST lets you specify a compatible system. COMP and CONS are just aliases for SYST - the aliases can be phased out. Removed arcade.flt and mess.flt altogether - opinion seems to be split between misinterpreting them as fully supported and considering them unnecessary. They were marginally useful as a performance test for makedep.py, but that isn't important. We still have nl.flt as an example .flt file (although it doesn't use "-" exclude directives). Moved the UI active flag from the machine to the UI manager. Nothing else uses it anyway (it's still accessible to scripts).
* Miscellaneous cleanup: Vas Crabb2023-03-211-2/+4
| | | | | | | | | render/bgfx/chainmanager.cpp: Only treat source file or more sepecific INI as higher priority than CFG file for setting screen chains. sega/model2.cpp, taito/taitocchip.cpp: Got rid of bankdev. Adjusted some doucmentation files.
* -render/d3d/d3dhlsl.cpp: Fixed alpha value when clearing target. [Ryan Holtz] Vas Crabb2023-03-211-1/+1
| | | | -jaleco/tetrisp2_v.cpp: Fixed stepstag text display. [Vas Crabb]
* Swapped R and B channels in lut-default.png, and adjusted D3D9 ↵ MooglyGuy2023-03-201-5/+7
| | | | | | LUT-application behaviour. (#11004) [Ryan Holtz] * lut-default.png: Swapped red and blue channels (fixes GitHub #11001). * render/d3d/d3dlsl.cpp: Changed screen LUT application to be applied during the color convolution pass on raster systems.
* More D3D HLSL regression fixes: (#11002) [Ryan Holtz] MooglyGuy2023-03-201-4/+6
| | | | | * hlsl/post.fx: Fixed double-drawing of screen data with D3D9 HLSL and screen scale/offset. * render/d3d/d3dhlsl.cpp: Fixed screen-container search function (fixes GitHub #10872). * render/d3d/d3dhlsl.cpp: Fixed downsample pass, fixes blocky vector bloom.
* osd: Moved some windows-specific stuff into osd/windows/window.{h,cpp}. Vas Crabb2023-02-263-16/+19
|
* render/sdlglcontext.h: Added missing override qualifier. Vas Crabb2023-02-251-1/+1
|
* osd: Fixed various OpenGL issues - fixes -nowaitvsync not working on Windows ↵ Vas Crabb2023-02-253-275/+310
| | | | | | | | | | | | | | with -video opengl. Turned shader tool/shader manager into a class so multiple screens/windows don't nuke each other. Don't try to get supported extensions without a valid GL context with Windows OSD. Use per-context GL function pointers for shader manager and for all functions when using GL dispatch. Windows doesn't guarantee extension functions from one context are valid for another.
* Fix building with gcc-13 (#10917) Julian Sikorski2023-02-202-0/+2
|
* Small batch of input refactoring: Vas Crabb2023-02-053-6/+6
| | | | | | | | | | | | | | | | | | | | | emu/input.cpp: Fixed regression in display of some joystick inputs. osd/interface: Split up interface classes into a few more files to reduce where the input device interface class needs to be included. Made OSD independent of concrete input_device class. osd/modules/input, emu/inputdev.cpp, emu/ioport.cpp: Allow input devices to provide tokens for controls without standard item types and additional default input assignments. Fixes issues assigning Yen and Backslash on Japanese keyboards. ui/textbox.cpp: Added a fixed-content text box menu class for future use. Got main.h out of emu.h as it’s only used in a very small number of places, mostly for getting the application name. Added eminline.h to attotime.h as it's used without emu.h. Cleaned up forward declarations in emufwd.h a little.
* osd/modules/render/draw13.cpp: Fixed leaked/double freed texture data. Vas Crabb2023-02-041-16/+11
| | | | | The texture malloc's its own storage if the copy info doesn't have the passthrough flag set - the test was reversed.
* osd/render/draw13.cpp: Got rid of a simple_list. Vas Crabb2023-02-042-52/+46
|
* BGFX: Check window manager type returned by SDL. Vas Crabb2023-02-032-26/+62
|
* render/drawd3d.cpp: Fixed prescaling without HLSL - WRL COM pointer has some ↵ Vas Crabb2023-02-022-62/+61
| | | | | | surprises. Also added some additional error checking.
* bgfx: Refined configuration handling: Vas Crabb2023-02-023-54/+97
| | | | | | | | | | | | | * Sort screen chains by none, default, then collation order (rather than whatever order the filesystem yields). * Correctly persist settings across fullscreen toggle when explicit screen chains are configured. * If chains are specified for a single window only, apply them to all windows. * Treat empty string for screen chain as "default" rather than crashing. * Changed default setting for bgfx_screen_chains to an empty string so chain selection will be saved/restored per system with mame.ini file created by -cc with no other settings.
* osd: Fixed BGFX crash on toggling fullscreen on Linux. Vas Crabb2023-02-023-71/+147
| | | | Also fixed draw13.cpp upsetting older versions of clang.
* render/bgfx: Fixed texture object lifecycle issues. Vas Crabb2023-02-0211-195/+229
|
* Use EQUIVALENT_ARRAY to avoid issues with std::size on member arrays, enable ↵ Vas Crabb2023-02-011-1/+1
| | | | warnings for VLAs in C++.
* osd/tools: msvc fixes Patrick Mackinlay2023-02-011-1/+1
| | | | | * xinput.h depends on windows.h * avoid use of non-standard variable-length arrays
* Implemented probe for D3D module to detect lack of D3D9 sooner. Vas Crabb2023-02-011-0/+12
|
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-0134-2596/+2658
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ignore the return status of OSD module initialisation. Attempt to fall back to an alternate module if the selected module fails to initialise. Log more useful diagnostic information at verbose level. Fixed BGFX crash on exit after toggling fullscreen. Also persist more settings than just the selected chains across toggling fullscreen. Turned video modules into OSD modules in the same sense as all the other OSD modules. They now use the same selection/fallback mechanism as all the other modules without special extra code in the OSD implementations. Untangled some object ownership mess. Windows own renderers, OSD objects own windows. Fixed a refrence loop that caused the first window object to always leak. Don't create renderer object until after underlying window has been created. Fixed issues with order of creation/destruction when toggling fullscreen or changing prescale in fullscreen with -switchres in SDL builds. Use more smart pointers in BGFX and Direct3D render modules. Most of the code now reutrns a smart pointer when handing over ownership or a naked pointer when retaining ownership. Fixed a few leaks and simplified cleanup code. Encapsulated various OSD modules better.
* render/bgfx: Fixed Linux build. Vas Crabb2023-01-292-3/+7
|
* render/bgfx: Got rid of a lot of unnecessary object copying during setup. Vas Crabb2023-01-2979-751/+777
|
* Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz] MooglyGuy2023-01-29139-625/+1475
| | | | | | | | | | | * render/bgfx: Improved clearing and blending. Added prescale support. Fixes MT07586, MT07587, MT08084. * render/bgfx: Fixed blend and tint handling. (Fixes Github #1953). * render/bgfx/blendreader.cpp: Support non-separated blend mode specification for BGFX effects. * render/bgfx: Reworked how horizontally-padded screen textures are handled. Likely fixes MT08512 and MT08505. * render/bgfx: Ensure that a texture's width margin is updated in all cases. * render/d3d/d3dhlsl.cpp: Fixed tinting in HLSL post-processing mode. * render/d3d/d3dhlsl.cpp: Avoid most redundant state-setting calls. Reduces D3D API calls by about 90% on fruit machine drivers. * render/d3d/d3dhlsl.cpp: Assign SourceDims and QuadDims uniforms to only those effects that use them. * machine/laserdsc.cpp: Always add video quad to screen container, adjust tint based on m_videoenable instead.
* Various input and OSD refactoring: Vas Crabb2023-01-295-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd: Supply OSD object to modules on initialisation. Encapsulated some event handling in the OSD objects rather than leaving it in free functions. Put various stuff in namespaces. osd/modules/input: Enabled dinput, xinput and winhybrid modules for Windows SDL builds, and enabled background input for dinput and xinput (and by extension winhybrid) modules. Also fixed some COM and X11 resource leaks. osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match Windows, and exposed vertical and horizontal scroll as Z and rZ axes. Moved SDL UI event handling out of input devices into OSD object. osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's correctly identified as a relative axis (it maps to the scroll wheel equivalent). osd: Added an option to choose the network provider module. Mostly useful if you build with both TUN/TAP and pcap support included, or if you want to disable emulated networking completely. emu/input.cpp: Use a better strategy for assembling input code names that uses fewer temporary strings and doesn't require use of the non-Unicode-aware space trimming function (fixes MT08552). osd/modules/input_dinput.cpp: Improved polling logic. osd: Made various parts of the input code less dependent on concrete emu objects, and reduced inappropriately passing around the machine object. Made input modules less dependent on OSD implementation. Encapsulated some stuff and got rid of some vestigial newui and SDL1 support code. Cleaned up some interfaces. Moved OSD options classes to their own files. Prepare to remove main.h from emu.h - it's mostly used to get the application name, which the vast majority of emulated devices don't need to do.
* Improve NTSC parameter descriptions and ranges in OSD (#10782) benrg2023-01-211-7/+7
| | | | | | Correct units of some parameters (they are MHz, not Hz) and correct one default (color carrier should be 3.57 MHz, not 35.7). Use a step size of 1/8800 MHz for the color carrier so that the NTSC value of 315/88 MHz can be exactly represented (to float precision).
* bgfx: Back out some formatting changes to minimise conflicts. Vas Crabb2023-01-081-2/+6
|
* bgfx: Save values of most sliders per-system. Vas Crabb2023-01-0810-149/+360
|
* Update BGFX, BX and BIMG (#10789) Miodrag Milanović2023-01-053-4/+8
| | | | * Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Revert "Update BGFX, BX and BIMG (#10750)" (#10787) R. Belmont2023-01-043-8/+4
| | | This reverts commit 5581eaa50a42256242f32569f59ce10d70ddd8c2 due to link failure on macOS.
* Update BGFX, BX and BIMG (#10750) Miodrag Milanović2023-01-043-4/+8
| | | | * Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Revert "-bgfx: Adjusted per-pass blending handling - fixes MT07586 and ↵ MooglyGuy2022-12-267-50/+15
| | | | | MT07587. (#10747) [Ryan Holtz]" (#10748) This reverts commit 2d893a60b4675359285737be173dfa632269cab3.
* -bgfx: Adjusted per-pass blending handling - fixes MT07586 and MT07587. ↵ MooglyGuy2022-12-267-15/+50
| | | | (#10747) [Ryan Holtz]
* osd/modules/file: Don't magically substitute environment variables when ↵ npwoods2022-12-173-4/+4
| | | | | | | | opening files. (#9859) * util/options.cpp: Added option types for single and multiple paths. * util/options.cpp: Substitute environment variables in values from defaults and INI files. * ui/dirmenu.cpp: Removed hard-coded list of multi-path options. * plugins: Don't substitute environment variables in path options.
* osd/modules/render/aviwrite.cpp: Use std::string_view for filename AJR2022-10-042-5/+7
|
* OSD/network interface cleanup AJR2022-08-281-0/+1
| | | | | | | - Move osd_midi_device from osdcore.h to osdepend.h - Move osd_list_network_adapters from osdcore.h to osdnet.h (was already defineduniquely in osdnet.cpp) - Move #include <cstdarg> from osdcore.h to emu.h - Remove dinetwork.h from emu.h
* bgfx: crt-geom and crt-geom-deluxe improvements: (#8653) cgwg2022-07-078-371/+238
| | | | | * crt-geom-deluxe: Increased number of taps for halation and increased maximum width. * crt-geom*: Moved repeated crt-geom/crt-geom-deluxe functions into their own file. * crt-geom and crt-geom-deluxe: added support for sRGB output gamma ramp and made it the default.
* Clean up #includes in src/osd (#10029) ajrhacker2022-07-0438-128/+159
| | | | | * Clean up #includes in src/osd * render/bgfx/view.cpp: Add license header
* osdcore.h: Changed osd_subst_env to accept a std::string_view and return a ↵ npwoods2022-06-153-9/+4
| | | | std::string. (#9928)
* bgfx: Honour antialias flag on textured quad primitives (fixes MT08340). Vas Crabb2022-06-061-1/+1
|
* bgfx: Honour texture wrap flag. (#9812) Vas Crabb2022-05-232-7/+10
|
* Removed superfluous semicolons from various source files. (#9796) 0kmg2022-05-222-2/+2
|
* -util/corealloc.h: Reduced make_unique_clear to a single variant for POD arrays. Vas Crabb2022-04-032-79/+79
| | | | | | | | | | | | | | | | | | * Enabled GCC lifetime dead store elimination optimisation. * emu/device.h: Don't pre-clear memory for drivers. Ivan Vangelista fixed at least the majority of things that crashed outright, and Robbbert initialised variables that coverity complained about. It's unlikely anything will break due to this. * sound/discrete.h: Explicitly initialise members of discrete "devices" to zero. I don't see a way around doing this in headers due to the macro soup used to build the constructors. * sound/mos6581.cpp: Moved creation of the SID core to device_start and explictly initialised members of the SID core structures. These structures are in internal headers, so they won't cause downstream recompiles. -Lua engine: Made I/O port manager type_seq a bit more tolerant of omitted arguments.
* -bgfx: Fixed YUV shader to have better brightness balance. [Ryan Holtz] (#9425) MooglyGuy2022-03-171-4/+5
|
* Updated BGFX fixes; verified as working on Linux and Windows. (#9420) MooglyGuy2022-03-1516-272/+450
| | | | | | | * -bgfx: Improved stability when encountering missing files, and improved multi-window stability. [Ryan Holtz] * -osd: Added video-init fallback functionality to other OSDs. [Ryan Holtz] * -bgfx: Fixed issues from the previous batch of changes. [Ryan Holtz] * -osdwindow: Remove no-longer-needed addition of post_create(). [Ryan Holtz]
* Revert "More BGFX stability improvements (missing files + multi-window) (#9410)" Vas Crabb2022-03-1613-342/+235
| | | | This reverts commit f5b75b74393646d1dc082ec807279451dc481854.
* More BGFX stability improvements (missing files + multi-window) (#9410) MooglyGuy2022-03-1413-235/+342
| | | | | * -bgfx: Improved stability when encountering missing files, and improved multi-window stability. [Ryan Holtz] * -osd: Added video-init fallback functionality to other OSDs. [Ryan Holtz]
* -bgfx: Added default LUT PNG, fixes LUT-effect crash. Fixed external texture ↵ MooglyGuy2022-03-122-8/+7
| | | | loading, restoring HQx filters. [Ryan Holtz] (#9401)
* Remove fileio.h from emu.h AJR2022-02-114-0/+4
|