summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render
Commit message (Collapse)AuthorAgeFilesLines
* Various improvements to image file handling: Vas Crabb2020-10-082-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | Moved MS DIB parser out of ICO file reader and made it available for artwork and layout images. Added more efficient I/O and better error checking for JPEG file loading (MAME will no longer exit immediately on a bad JPEG file). Made caller responsible for opening files for loading images, to avoid decompressing images used in ZIP/7z artwork multiple times. Added support for JPEG and Windows DIB to picture_image_device. Added support for SVG image files in external artwork. Added support for using I/O port value for animation state and masking animation state values. Made bounds elements more flexible in layouts. Reworked headers to reduce dependencies. Updated layout file format documentation.
* emu/render.cpp: Consider that screens can be hidden when choosing a default ↵ Vas Crabb2020-10-032-2/+2
| | | | view.
* Got rid of global_alloc/global_free. Vas Crabb2020-10-0311-89/+69
| | | | | | | | | | | | | | | | | | | | | | | | | The global_alloc/global_free functions have outlived their usefulness. They don't allow consistently overriding the default memory allocation behaviour because they aren't used consistently, and we don't have standard library allocator wrappers for them that we'd need to use them consistently with all the standard library containers we're using. If you need to change the default allocator behaviour, you can override the new/delete operators, and there are ways to get more fine-grained control that way. We're already doing that to pre-fill memory in debug builds. Code was already starting to depend on global_alloc/global_free wrapping new/delete. For example some parts of the code (including the UI and Windows debugger) was putting the result of global_alloc in a std::unique_ptr wrappers without custom deleters, and the SPU sound device was assuming it could use global_free to release memory allocated with operator new. There was also code misunderstanding the behaviour of global_alloc, for example the GROM port cartridge code was checking for nullptr when a failure will actually throw std::bad_alloc. As well as substituting new/delete, I've made several things use smart pointers to reduce the chance of leaks, and fixed a couple of leaks, too.
* -Got rid of most of the remaining problematic uses of make_unique_clear. Vas Crabb2020-09-304-4/+4
| | | | -sound/discrete.cpp: Use C++ std::vector and range-based for.
* Cleaned up bitmap API. Vas Crabb2020-09-272-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>.
* -util/xmlfile: Escape attribute and element content. Vas Crabb2020-09-062-2/+2
| | | | | | | | | | | | | | | | | | | | The previous behaviour was unintuitive - parsing an XML file and writing it out immediately would produce invalid XML if the file contained any characters that needed escaping. It makes far more sense to escape on writing rather than expecting the user to escape input. -Add preliminary support for visibility toggles to artwork system. This allows the user to show/hide related elements in a view, with nesting. The view can specify whether elements are shown or hidden by default. Settings are saved per host window/screen per view. There is no way to set the initial visibility state on the command line. Legacy "Space Invaders cabinet model" layers are mapped onto visibility toggles. This is not stable yet. In particular, the XML element/attribute names have not been finalised. The new features have not been added to complay.py to prevent them from being used before they're finalised.
* drawd3d: properly clean up d3dintf (nw) hap2020-06-211-0/+3
|
* -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-2012-20/+28
| | | | enough texture data for width*height, not rowpixels*height. [Ryan Holtz]
* MAME Testers Bugs Fixed Ryan Holtz2020-05-282-169/+86
| | | | | | | ----------------------- 07536: [Graphics] Prescale option does not work properly on D3D renderer (Ryan Holtz) -renderer/d3d: Removed old StretchRect code. All drivers these days punt it to a shader backend anyway, and it's causing issues with -prescale. [Ryan Holtz]
* Revert "fixed some modernize-use-equals-default clang-tidy warnings (… (#6360) Oliver Stöneberg2020-04-081-1/+1
| | | | | | | * Revert "fixed some modernize-use-equals-default clang-tidy warnings (nw)" This reverts commit 54486ab9 * fixed merge error
* there are reasons for things being the way they were (nw) Vas Crabb2020-01-312-1/+5
|
* fixed some modernize-use-auto clang-tidy warnings (nw) (#6238) Oliver Stöneberg2020-01-3014-57/+57
|
* fixed some modernize-use-equals-default clang-tidy warnings (nw) (#6237) Oliver Stöneberg2020-01-302-5/+1
|
* fixed some clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-304-7/+7
| | | | | | | | | | | | | | | | * fixed some modernize-redundant-void-arg clang-tidy warnings (nw) * fixed some modernize-use-bool-literals clang-tidy warnings (nw) * fixed some modernize-use-emplace clang-tidy warnings (nw) * fixed some performance-move-const-arg clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* Revert accidentally committed changes. (nw) couriersud2020-01-251-17/+5
|
* segas16b: Added analog filters. [Couriersud] couriersud2020-01-251-5/+17
| | | | Analog filters added to systems with YM2151 and UPD7759. Reviewers can use USE_NL define to produce unfiltered sound.
* Merge pull request #6195 from firewave/includes R. Belmont2020-01-226-11/+11
|\ | | | | use C++ library includes (nw)
| * use C++ library includes (nw) firewave2020-01-226-11/+11
| |
* | fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-1/+1
|/ | | | | | | | | | | | | | * fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* opengl: clamp to edge, same as the other renderers (nw) hap2020-01-041-8/+8
|
* Happy New Year 2020 (nw) (#6128) Stiletto2020-01-041-1/+1
| | | Happy New Year 2020 (nw) (#6128)
* render/bgfx: Fix incorrect swapping of red and blue components of screen tint AJR2019-12-311-1/+1
|
* Changed Direct3D renderer to call GetAncestor() in device_create() to npwoods2019-12-221-1/+5
| | | | | | get the root window This is to make -attach_window work with non-root windows
* netlist: Revert development code committed by accident. (nw) couriersud2019-11-261-13/+2
|
* netlist: move nl_examples to src/lib/netlist/examples. (nw) couriersud2019-11-251-2/+13
| | | One folder less in the top-level.
* Clean up render_screen_list code, replacing simple_list with std::list (nw) AJR2019-11-242-2/+2
|
* -bgfx: Fixed Github issue #5961. [Ryan Holtz] MooglyGuy2019-11-241-2/+2
|
* Opengl: Apply line width provided by renderer. [Couriersud] couriersud2019-11-241-0/+1
|
* 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.
* srcclean (nw) Vas Crabb2019-11-253-3/+3
|
* -bgfx: Fixed Github issues #5830 and #5956. [Ryan Holtz] MooglyGuy2019-11-2512-47/+119
|
* srcclean and indentation cleanup (nw) Vas Crabb2019-11-241-22/+22
|
* Opengl render driver: fix bug preventing adjustment of ... [Couriersud] couriersud2019-11-241-1/+1
| | | | | | | | | | | | gamma, brightness and contrast. Starting MAME with defaults, i.e. gamma == 1.0, no rgb palette will be allocated. If gamma than is changed, a new palette will be allocated. But the texture will not be updated because the palette is not checked. This fix will check for palette changes. Note: if the palette is changed inplace, i.e. without reallocation, this will fail. The correct fix would be that the texture palette is not only a pointer to rgb_t * but to texture_palette_type. texture_palette_type would hold the pointer, the length and a sequential id which is checked in addition to pointer equality.
* -bgfx: Fixed broken rendering when using bgfx_screen_chains none, nw mooglyguy2019-11-223-7/+28
|
* opengl: work around Retina issue on macOS Catalina until SDL catches up [R. ↵ arbee2019-11-161-1/+39
| | | | Belmont]
* Sync bgfx, bx and bimg with upstream; fix the hlsl fs_chroma.sc matrix ↵ Julian Sikorski2019-11-122-16/+8
| | | | | | | | | | | | | | transposition properly (#5875) * Sync bgfx with upstream revision 280420d * Sync bx with upstream revision 267727d * Sync bimg with upstream revision c1bab10 * Use bgfx helper functions to ensure correct matrix orientation * Rebuild hlsl chain
* bgfx: fix tgmj crash on resolution change (GitHub #5857) [Ryan Holtz Vas Crabb2019-11-061-0/+8
|
* bgfx: fix resource leak (nw) (#5820) algestam2019-10-281-0/+1
|
* srcclean (nw) Vas Crabb2019-10-264-29/+29
|
* (nw) keep a persistent temporary palette buffer in bgfx chain manager, back ↵ Vas Crabb2019-10-252-6/+7
| | | | out some unintentional screen changes
* -bgfx: Uncomment D3D12 backend detection, as it apparently no longer crashes ↵ MooglyGuy2019-10-231-5/+4
| | | | on exit on Win7, nw
* -bgfx: Fixed incorrect pitch of palette uploads, fixes 16-bit palettized ↵ MooglyGuy2019-10-231-4/+8
| | | | textures in Vulkan backend on BGFX. nw
* -bgfx: Fix crash when scrolling current effect to 'none', nw MooglyGuy2019-10-221-1/+1
|
* -bgfx: Rework chain updating to minimize primlist locking, nw MooglyGuy2019-10-227-111/+186
|
* -bgfx: Fixed opengl backend, nw MooglyGuy2019-10-211-0/+2
|
* Make shaders fixes (#5730) Julian Sikorski2019-10-131-14/+15
| | | | | | * Actually honor VERBOSE setting * Current shaders build setup is not capable of parallel build
* -bgfx: Do texture format conversion via a full-screen GPU pass. [Ryan Holtz] MooglyGuy2019-10-1319-60/+279
|
* WIP: sync bgfx, bx and bimg with latest upstream (#5723) Julian Sikorski2019-10-137-22/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* SDL: support RRGGBB00 format used by ARM Mali GPUs [R. Belmont] arbee2019-10-061-0/+4
|