summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render (follow)
Commit message (Collapse)AuthorAgeFilesLines
* d3dhlsl: fix possible array overflow with system name string hap13 days2-3/+3
|
* drawogl: increase texture hashtable size (emirage/robotadv were crashing ↵ hap2024-03-201-2/+2
| | | | with opengl renderer)
* Removed some unnecessary backslash line continuations. (#12047) amameuser2024-02-213-10/+10
| | | | | | * Removed unnecessary preprocessor line continuations from C++ code. * Use parentheses to avoid need for line continuations in expressions in Python code. * Removed line continuations at the end of lists in makefiles. * cpu/m68000: Regenerated C++ source files.
* modules/render/bgfx/clearreader.cpp: Use std::clamp AJR2023-11-041-3/+3
|
* Miscellaneous change roll-up: Vas Crabb2023-09-291-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | render/drawbgfx.cpp: Return an error if Wayland EGL surface can't be created for additional windows. emu/emucore.h: Added explicitly defaulted copy and move constructors for emu_fatalerror. Fixed apparent misunderstanding of const. Returning const value types and casting to const value types is pointless outside very narrow use cases. Putting const value type parameters in interfaces just makes trouble. cpu/adsp2100: Use count_leading_ones_32 where it's simple rather than inverting and counting leading zeroes. util/multibyte.h: Don't pollute global namespace, constexpr implies inline, make narrowing casts explicit. imagedev/simh_tape_image.h: inline is implied for member functions with bodies supplied at declaration. Tidied up some ugly casts in various places.
* render/drawbgfx.cpp: Added initial support for Wayland on Linux. (#11451) Julian Sikorski2023-09-291-4/+44
|
* Revert "Updated bgfx, bx and bimg to current upstream versions. (#11493)" Vas Crabb2023-09-081-5/+5
| | | | This reverts commit 1c61ccfe840cdae7a9f92292946a45f3b47e2412.
* Updated bgfx, bx and bimg to current upstream versions. (#11493) Julian Sikorski2023-09-061-5/+5
| | | | | | * Reverted "macOS, iOS: Removed OpenGL/OpenGLES support. (commit 4693983242a698eaafed87faf4ffef1789adc8f9). * Reverted "Fix macOS build" (commit ce2c2c13eda7d699051f75f598e740a447343a88). * Reverted "macOS: Fixed deprecated warnings." (commit 10a8cb61f882ebc9bb376ee2341d003880b7037f). * Added bgfx/README.mame explaining deviations from upstream.
* render/drawogl.cpp: Size point primitives properly. This fixes ↵ AJR2023-08-221-1/+4
| | | | -beam_dot_size being effectively ignored by this renderer.
* render/draw13.cpp: Avoid divide-by-zero with low-resolution time source. ↵ Rob2023-08-011-1/+1
| | | | | (#11442) Emscripten builds are affected as clock resolution is intentionally degraded to mitigate side channel exfiltration attacks.
* render/drawsdl.cpp: Don't request OpenGL context. (#11435) hiromasa2023-07-301-1/+1
|
* BGFX and D3D9 renderer fixes for issues #11104, #11106, and #11107 (#11249) MooglyGuy2023-05-202-5/+12
| | | | | * -hlsl.json: Removed duplicate scanline_variation setting. (#11107) [Ryan Holtz] * -d3dhlsl.cpp: Fixed lack of post-pass application when bloom is disabled. (#11104) [Ryan Holtz] * -drawd3d.cpp: Always set a default texture at scene start. (#11106) [Ryan Holtz]
* 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.