summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/drawbgfx.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Update BGFX and BX packages and update MAME code to support new API (nw) Miodrag Milanovic2016-09-031-5/+49
| | | | Generated missing shaders (nw)
* Cleanups and version bump Miodrag Milanovic2016-07-271-2/+2
|
* BGFX: fix crash when bgfx effect folder is not present or incomplete Giuseppe Gorgoglione2016-07-181-0/+20
| | | | BGFX renderer requires some effects also when post-processing is disabled. If they are not available, MAME complains about missing effect files, but then goes on and crashes soon after printing the backtrace. This fix just exits gracefully when effect files are incomplete and falls back to a different renderer if the bgfx folder is missing at all, warning the user in advance.
* Fixed MT #6291 ImJezze2016-07-161-18/+23
| | | | | | | | * fixed copy of texture data to bitmap in BGFX * changed AVI dimension to a lowest integral multiple of 4 (2 was still to low for most video players, e.g. VLC) * added audio to AVI record in HLSL * HLSL AVI record now uses window dimension instead of snap dimension
* Restore ability to supply explicit name for bgfx AVI output file, auto ↵ Vas Crabb2016-07-071-1/+1
| | | | causes it to generate ascending snap names
* Remove bgfx_avi_name and hlsl_write options Giuseppe Gorgoglione2016-07-041-1/+1
| | | | | | Now the filenames for movies recorded by HLSL and BGFX renderers are automatically generated just like the ones for movies and snapshots recorded by the video core. They are generated according to the "snapname" template (eg. by default <snap_folder>/<device_name>/<numeric_index.avi>, so you can revert to the old behavior (why?) just setting "snapname bgfx.avi" or "snapname hlsl.avi". The main advantage is that now you can record as many movies as you want during a single gaming session without much hassle (previously you had to move or rename the old movie file by hand before recording a new one).
* Procedural texture for vectors in HLSL ImJezze2016-06-051-0/+7
| | | | | | * added simple procedural texture for vectors with rounded line ends and beam smoothness * added optional -vector_beam_smooth option * removed -antialias option, antialiasing is now always applied, except for plain D3D
* Vector line width is now applied by BGFX ImJezze2016-05-291-1/+13
|
* ui refactoring [Vas Crabb] Vas Crabb2016-05-271-1/+1
| | | | | | | * move menu classes into ::ui namesapce * reduce scope of many symbols (first step in making UI code less rage-inducing so I can fix text input)
* RIP sdlinc.h couriersud2016-05-061-1/+1
|
* Cleanups and version bumpmame0173 Miodrag Milanovic2016-04-271-90/+93
|
* Revert "Temp revert of Brad changes (nw)" Miodrag Milanovic2016-04-251-35/+45
| | | | This reverts commit 5e831f6506ee06f8c30cb113551ee0fec53804db.
* Temp revert of Brad changes (nw) Miodrag Milanovic2016-04-251-45/+35
|
* Refactor OSD window. Brad Hughes2016-04-211-35/+45
| | | | | | | | | | Unified renderer in osd_window as std::unique_ptr Made windows all std::shared_ptr<window_type> Made window lists std::list<std::shared_ptr<window_type>> Updated OSD SDL worker_param to not use malloc (not compatible with smart pointers) Made renderer pointer to window a weak reference. May not be available during destruction of the window.
* Standardize platform window pointer storage in osd_window. Brad Hughes2016-04-181-6/+6
| | | | Also encapsulate show/hide capture/release cursor functionality.
* Add AVI writing to bgfx, nw therealmogminer@gmail.com2016-04-171-165/+150
|
* Fix compile error on SDL targets therealmogminer@gmail.com2016-04-161-0/+2
|
* Add pillarboxing shaders and layout for bgfx, nw therealmogminer@gmail.com2016-04-161-18/+58
|
* Make OSDs return ui_menu_item lists, not slider_state lists therealmogminer@gmail.com2016-04-101-1/+1
|
* Make sliders use an std::vector instead of a linked list, nw therealmogminer@gmail.com2016-04-101-1/+1
|
* Add runtime screen chain selection, nw therealmogminer@gmail.com2016-04-091-2/+7
|