summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/drawbgfx.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* osd: Moved some windows-specific stuff into osd/windows/window.{h,cpp}. Vas Crabb2023-02-261-1/+1
|
* BGFX: Check window manager type returned by SDL. Vas Crabb2023-02-031-24/+62
|
* bgfx: Refined configuration handling: Vas Crabb2023-02-021-3/+4
| | | | | | | | | | | | | * 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-021-53/+127
| | | | Also fixed draw13.cpp upsetting older versions of clang.
* render/bgfx: Fixed texture object lifecycle issues. Vas Crabb2023-02-021-1/+0
|
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-011-295/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz] MooglyGuy2023-01-291-29/+65
| | | | | | | | | | | * 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.
* bgfx: Save values of most sliders per-system. Vas Crabb2023-01-081-27/+84
|
* Clean up #includes in src/osd (#10029) ajrhacker2022-07-041-0/+27
| | | | | * Clean up #includes in src/osd * render/bgfx/view.cpp: Add license header
* 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-231-6/+6
|
* Updated BGFX fixes; verified as working on Linux and Windows. (#9420) MooglyGuy2022-03-151-165/+199
| | | | | | | * -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-161-120/+136
| | | | This reverts commit f5b75b74393646d1dc082ec807279451dc481854.
* More BGFX stability improvements (missing files + multi-window) (#9410) MooglyGuy2022-03-141-136/+120
| | | | | * -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]
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-261-24/+1
|
* -bgfx: Switched fs_blit_palette16 to expand bitmap_ind16 contents to R8. ↵ MooglyGuy2021-09-041-3/+4
| | | | Fixes vertical off-by-one shift in games with an odd pixel count along X. [Ryan Holtz] (#8528)
* BGFX fixes for various backends (#8469) [Ryan Holtz] MooglyGuy2021-08-201-10/+13
| | | | * Fixed palette and UYVY conversion in all backends. Fixes MT07760. * Fixed a typo in targetmanager.cpp, thanks LN for the heads-up.
* Remove not suported platform Miodrag Milanovic2021-08-151-5/+0
|
* osdwindow.cpp: Centralize basic functions; de-virtualize various getters AJR2021-01-041-15/+15
|
* Cleaned up bitmap API. Vas Crabb2020-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return const-qualified references/pointers to pixesl, and added non-const versions. This makes bitmap more like standard library containers where const protects the content as well as the dimensions. Made the templated pixt accessor protected - having it public makes it too easy to inadvertently get a pointer to the wrong location. Removed the pix(8|16|32|64) accessors from the specific bitmaps. You could only use the "correct" one anyway, and having the "incorrect" ones available prevented explicit instantiations of the class template because the static assertions would fail. You can still see the pixel type in the bitmap class names, and you can't assign the result of &pix(y, x) to the wrong kind of pointer without a cast. Added fill member functions to the specific bitmap template, and added a explicit instantiations. This allows the bitmap size check to be skipped on most bitmap fills, although the clipping check is still there. Also fixed a couple of places that were trying to fill an indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with zero to get the same net effect). The explicit template instantiations in the .cpp file mean the compiler can inline the function if necessary, but don't need to generate a local out-of-line body if it chooses not to. Extended the size of the fill value parameter in the base bitmap class to 64 bits so it works correctly for 64-bit bitmaps. Fixed places where IE15 and VGM visualiser weren't accounting for row bytes potentially being larger than width. Fixed an off-by-one in an HP-DIO card where it was treating the Topcat cursor right edge as exclusive. Updated everything to work with the API changes, reduced the scope of many variables, added more const, and replaced a few fill/copy loops with stuff from <algorithm>.
* -bgfx: Don't try to invoke a frame immediately after resetting the renderer ↵ Ryan Holtz2020-06-201-2/+2
| | | | during tear-down. Fixes crash on exit with the d3d12 backend. [Ryan Holtz]
* -bgfx: Corrected a data overrun in the d3d12 backend from allocating only ↵ Ryan Holtz2020-06-201-1/+1
| | | | enough texture data for width*height, not rowpixels*height. [Ryan Holtz]
* fixed some modernize-use-auto clang-tidy warnings (nw) (#6238) Oliver Stöneberg2020-01-301-4/+4
|
* bgfx: Fix edge case around B/C/G settings. [Couriersud] couriersud2019-11-241-1/+2
| | | | | | If e.g. kidniki is started with default gamma (1.0), changing gamma with slider doesn't work. Setting to a gamma <> 1 and restarting MAME will apply the gamma. This commit fixes this.
* -bgfx: Fixed broken rendering when using bgfx_screen_chains none, nw mooglyguy2019-11-221-4/+20
|
* -bgfx: Uncomment D3D12 backend detection, as it apparently no longer crashes ↵ MooglyGuy2019-10-231-5/+4
| | | | on exit on Win7, nw
* -bgfx: Rework chain updating to minimize primlist locking, nw MooglyGuy2019-10-221-1/+15
|
* -bgfx: Do texture format conversion via a full-screen GPU pass. [Ryan Holtz] MooglyGuy2019-10-131-2/+4
|
* WIP: sync bgfx, bx and bimg with latest upstream (#5723) Julian Sikorski2019-10-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sync with bgfx upstream revision b91d0b6 * Sync with bx upstream revision d60912b * Sync with bimg upstream revision bd81f60 * Add astc-codec decoder * Rename VertexDecl to VertexLayout * Rename UniformType enum Int1 to Sampler. * Add NVN stub * Fix unused-const-variable error on macOS * Drop redundant explicit language parameters buildoptions_cpp are only applied to c++ files and buildoptions_objcpp are only applied to objective c++ files. As such, hardcoding -x offers no benefit while preventing overrides (such as one needed by 3rdparty/bgfx/src/renderer_vk.cpp on macOS) from working. * Re-introduce -x c++ in places where C code is compiled as C++ to prevent clang from throwing a warning * Build bgfx as Objective-C++ on macOS It is needed due to included headers * Enable Direct3D12 and Vulkan bgfx rendering backends * Enable building of spirv shaders * Properly escape /c in cmd call * Comment out dx12 bgfx renderer * Honor VERBOSE setting during shaders build * Only invert hlsl shader XYZ_TO_sRGB matrix for opengl * Add spirv shaders * OpenGL ES needs transposed matrix too * Metal needs transposed matrix as well
* Preliminary Mac native OSD. Not working yet. [R. Belmont] arbee2019-09-151-0/+21
| | | | | | | | This will compile, link, and run a driver all the way to the first info screen, provided you use -video bgfx. However, although there's a valid NSWindow created, it never actually appears on screen for unknown (but likely silly) reasons. Inputs are not implemented and fullscreen exists but is untried.
* 3rdparty: Updated bgfx, bimg, and bx to latest upstream. [Ryan Holtz] mooglyguy2018-12-051-13/+18
|
* (nw) fix lots of inadverently mutable static pointers Vas Crabb2018-09-201-4/+4
|
* -bgfx: Improved rendering with artwork by 5-10x or more. [Ryan Holtz] mooglyguy2018-08-261-6/+3
|
* Not going to pretend I understand that code, but that reduces blowups (nw) Olivier Galibert2018-07-181-1/+2
|
* -bgfx: Abstracted some view-related functions into bgfx_view class, nw mooglyguy2018-01-131-94/+62
|
* bgfx: Use bgfx::ViewMode::Sequential, fixes handheld overlays, nw mooglyguy2018-01-011-0/+2
|
* Updated GENie, BGFX, BX, added BIMG since it is separated now, updated all ↵ Miodrag Milanovic2017-12-011-12/+11
| | | | shader binaries and MAME part of code to support new interfaces [Miodrag Milanovic]
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-1/+0
|
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-0/+1
| | | | | | | | | | | | This reverts commit 536990e77b49ccc50ef275bfbf1018cc29c16154. Conflicts: src/frontend/mame/mame.cpp Sorry, but this change was half-baked. It breaks a lot of existing functionality and clearly hasn't been tested in more than a tiny subset of use cases. Please play this work back onto your own branch, and test it before submitting another PR.
* Overhaul to how MAME handles options (#2260) npwoods2017-05-051-1/+0
| | | | | | | | | | | | This is an overhaul to how MAME handles options to provide a better foundation for what MAME is already doing in practice. Previously, core_options was designed to provide an input/output facility for reading options from the command line and INI files. However, the current needs (image/slot/get_default_card_software calculus and MewUI) go way beyond that. Broadly, this PR makes the following changes: * core_options now has an extensibility mechanism, so one can register options that behave dramatically differently * With that foundation, emu_options now encapsulates all of the funky image/slot/get_default_card_software calculus that were previously handled by static methods in mameopts.cpp. Changes to emu_options should not automatically cascade in such a way so that it stays in a consistent state * emu_options no longer provides direct access to the slot_options/image_options maps; there are simpler API functions that control these capabilities * Many core_options functions that expose internal data structures (e.g. - priority) that were only really needed because of previous (now obsolete) techniques have been removed. * core_options is now exception based (rather than dumping text to an std::string). The burden is on the caller to catch these, and discern between warnings and errors as needed. Obviously this is a risky change; that's why this is being submitted at the start of the dev cycle.
* Fix compile with latest BGFX (nw) Miodrag Milanovic2017-01-021-5/+6
|
* Move special windows.h include directives to build defines (nw) Brad Hughes2016-12-281-1/+0
|
* Change window handle storage to template instead of void* (nw) (#1725) Brad Hughes2016-11-171-11/+12
| | | | * Change window handle storage to template instead of void* (nw)
* UWP builds again but by no means working (nw) Brad Hughes2016-11-101-3/+3
|
* Add more UWP support (nw) Miodrag Milanovic2016-11-091-2/+24
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-24/+24
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* srcclean (nw) Vas Crabb2016-09-261-5/+5
|
* Fix build (nw) Miodrag Milanovic2016-09-031-14/+12
|