Commit graph

116 commits

Author SHA1 Message Date
Vas Crabb
44eb5ea3c6 Revert "Updated bgfx, bx and bimg to current upstream versions. (#11493)"
This reverts commit 1c61ccfe84.
2023-09-08 05:14:35 +10:00
Julian Sikorski
1c61ccfe84
Updated bgfx, bx and bimg to current upstream versions. (#11493)
* Reverted "macOS, iOS: Removed OpenGL/OpenGLES support. (commit 4693983242).
* Reverted "Fix macOS build" (commit ce2c2c13eda7d699051f75f598e740a447343a88).
* Reverted "macOS: Fixed deprecated warnings." (commit 10a8cb61f8).
* Added bgfx/README.mame explaining deviations from upstream.
2023-09-06 01:10:24 +10:00
MooglyGuy
e89eb3e77c
BGFX and D3D9 renderer fixes for issues #11104, #11106, and #11107 (#11249)
* -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]
2023-05-20 08:05:42 -04:00
MooglyGuy
5671484fc8
Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz]
* 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.
2023-01-29 03:59:25 +11:00
benrg
4b33449a76
Improve NTSC parameter descriptions and ranges in OSD (#10782)
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).
2023-01-21 18:56:05 -05:00
Miodrag Milanović
812e6094f4
Update BGFX, BX and BIMG (#10789)
* Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2023-01-05 09:32:40 -05:00
R. Belmont
94b1e168b2
Revert "Update BGFX, BX and BIMG (#10750)" (#10787)
This reverts commit 5581eaa50a due to link failure on macOS.
2023-01-04 23:29:18 -05:00
Miodrag Milanović
5581eaa50a
Update BGFX, BX and BIMG (#10750)
* Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2023-01-04 23:12:10 -05:00
MooglyGuy
574a356e41
Revert "-bgfx: Adjusted per-pass blending handling - fixes MT07586 and MT07587. (#10747) [Ryan Holtz]" (#10748)
This reverts commit 2d893a60b4.
2022-12-26 23:13:02 +11:00
MooglyGuy
2d893a60b4
-bgfx: Adjusted per-pass blending handling - fixes MT07586 and MT07587. (#10747) [Ryan Holtz] 2022-12-26 14:40:43 +11:00
Vas Crabb
b56cd5707f -machine/intelfsh.cpp: Added Macronix 29F008TC (1M*8, 4K*8 pages).
-bgfx: Removed obsolete sample layout files, updated documentation.

New NOT_WORKING software list items (gbcolor.xml)
-------------------------------------------------
Chāojí Gédòu 2001 Alpha (Taiwan) [taizou]
Gédòu Jiàn Shén - Soul Falchion (Taiwan) [taizou]
2022-09-06 07:05:25 +10:00
Vas Crabb
b55671d63a bgfx: Re-built shaders for crt-geom update. 2022-07-07 20:04:22 +10:00
cgwg
75466ad87d
bgfx: crt-geom and crt-geom-deluxe improvements: (#8653)
* 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.
2022-07-07 19:15:55 +10:00
MooglyGuy
0ae650ffbb
-bgfx: Fixed YUV shader to have better brightness balance. [Ryan Holtz] (#9425) 2022-03-17 04:40:38 +11:00
MooglyGuy
1ad39cb5dd
-bgfx: Added default LUT PNG, fixes LUT-effect crash. Fixed external texture loading, restoring HQx filters. [Ryan Holtz] (#9401) 2022-03-12 20:30:02 -05:00
sairuk
498491a697
bgfx: Updated mipmap support in Fighters chain. (#8692)
Fixes crashes on Linux using Vulkan backend (GitHub #8538).
2021-10-12 23:00:21 +11:00
MooglyGuy
cbc2489dfc
-bgfx: Switched fs_blit_palette16 to expand bitmap_ind16 contents to R8. Fixes vertical off-by-one shift in games with an odd pixel count along X. [Ryan Holtz] (#8528) 2021-09-04 09:02:10 -04:00
MooglyGuy
793875bf4d
-bgfx: Fixed UV rounding errors in fs_blit_palette16; Switched back to direct texture upload rather than CPU copy. (#8505) [Ryan Holtz] 2021-08-30 01:49:03 +10:00
MooglyGuy
a472f4663f
-bgfx: Revised fs_blit_palette16 to not use pixel rounding. Fixes issues in carpolo, kncljoe, and others. [Ryan Holtz] (#8488) 2021-08-24 10:33:47 -04:00
Vas Crabb
0c49c74ada srcclean: Added JSON cleaning support, and some cleanup.
Made pbobble parent of bublbust, as it seems to be more widespread and
more complete.  Also fixed some ROM labels for bublbust.

Made tbyahhoo parent of mtwinbee as the latter has substantial content
removed rather than being localised, making it less complete.

Applied srcclean to JSON files in bgfx subtree.
2021-08-20 05:52:27 +10:00
MooglyGuy
190f50e0a4
BGFX fixes for various backends (#8469) [Ryan Holtz]
* Fixed palette and UYVY conversion in all backends. Fixes MT07760.
* Fixed a typo in targetmanager.cpp, thanks LN for the heads-up.
2021-08-20 03:07:28 +10:00
Miodrag Milanovic
4c9b0b24dc bgfx shaders recompile 2021-08-13 11:21:46 +02:00
Aaron Giles
2ccc0a290a bgfx: Disable lowpass filter by default by setting it to its maximum value, since it does not account for actual monitor type. We can revisit this decision in the future if better monitor information is provided from the driver. 2021-03-23 09:31:32 -07:00
Vas Crabb
a860495f6c bgfx: Fixed crt-geom{,-deluxe} shader compilation and recompiled shaders. 2021-03-20 02:58:53 +11:00
cgwg
931f85ee27
bgfx: crt-geom and crt-geom-deluxe enhancements (#7872)
* Made spot size parameters adjustable also increased samples from 2 to 3 scanlines for crt-geom-deluxe.
* Made horizontal interpolation adjustable.
* bgfx crt-geom-deluxe: Made phosphor decay smoothly to zero at specified cutoff time.
* bgfx crt-geom-deluxe: Added lowpass filter.
2021-03-20 02:38:07 +11:00
Vas Crabb
574b21ffb9 bgfx: Compiled new shaders for Direct3D, ESSL, Metal and SPIR-V. 2021-02-21 15:24:27 +11:00
cgwg
92b2921754
bgfx: crt-geom and crt-geom-deluxe enhancements (#7766)
Added a "brightness boost" feature for the shadow mask that works by making the brightness ratio between bright and dark mask pixels closer to 1 for the brighter parts of the image.

Added clamping to zero so that underscanning produces a black border.

Added a "raster bloom" effect to crt-geom-deluxe that makes the image grow slightly when the average brightness of the screen is high, mimicking a common defect in CRTs.
2021-02-21 14:47:28 +11:00
Vas Crabb
e713adea33 bgfx: Fixed overlapping register in lcd-grid shaders and compiled for Direct3D, SPIR-V, Metal, etc. 2021-01-23 15:25:33 +11:00
cgwg
42a2b0006b
bgfx: Added lcd-grid shader. (#7691)
Note that this is currently only compiled for GLSL.
2021-01-23 15:04:48 +11:00
Ryan Holtz
bdae1de304 -bgfx: Shader recompile after cgwg's changes. [Ryan Holtz] 2020-12-23 22:50:51 +01:00
cgwg
1a9560f064 Modified crt-geom-deluxe to track the power-law fall-off for longer (up to 1024 frames). Ensured that the intensity falls to zero afterward.
Note that this is currently only compiled for GLSL.
2020-12-23 21:56:05 +01:00
Ryan Holtz
3fa3969c9b -bgfx: Corrected hlsl.json to apply the intended screen tint. [Ryan Holtz] 2020-06-20 15:42:50 +02:00
arbee
b575f0d00a This wasn't supposed to go in (nw) 2020-02-18 22:54:13 -05:00
arbee
e95e2a743d apple2: figured out C800 banking on the Applesurance card, it now works 100% (nw) 2020-02-18 22:51:46 -05:00
MooglyGuy
8dd5e3d200 -bgfx: Fixed Github issue #5961. [Ryan Holtz] 2019-11-24 19:30:08 +01:00
MooglyGuy
4cccc0183c -bgfx: Fixed Github issues #5830 and #5956. [Ryan Holtz] 2019-11-24 15:40:28 +01:00
Julian Sikorski
0c70101b74 Sync bgfx, bx and bimg with upstream; fix the hlsl fs_chroma.sc matrix 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
2019-11-12 22:08:23 -05:00
MooglyGuy
c24d44ec62 -bgfx: Fixed opengl backend, nw 2019-10-21 16:34:41 +02:00
Olivier Galibert
ff61acb863 Add missing spirv shaders (nw) 2019-10-14 14:36:05 +02:00
MooglyGuy
61b2a8afaf -bgfx: Do texture format conversion via a full-screen GPU pass. [Ryan Holtz] 2019-10-13 20:59:35 +02:00
Julian Sikorski
0837e7451a WIP: sync bgfx, bx and bimg with latest upstream (#5723)
* 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
2019-10-13 07:50:38 -04:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
Henrik Algestam
40efb8f5aa Transposed transformation matrix to fix bgfx colors (nw) 2019-01-08 23:48:12 +01:00
Vas Crabb
9cbc957076 (nw) misc cleanup:
* tabify a JSON file (not currently handled by srcclean)
* get rid of stray printf
* µ'nSP in header comments - we do UTF-8 source
* spg2xx.cpp: make room for LOG_GENERAL - it's defined as (1U << 0) if you don't give it a different value
* spg2xx.h: inline on member function declarations generally doesn't do anything useful - it's implicit when the function body is inlined at declaration, and in other cases you usually want to put the inline qualifier on the definition, not the declaration
* rainbow.cpp: revert mouse changes - there's no reason a Mouse Systems driver couldn't be loaded, and the Logitech mouse is Microsoft-compatible
* video21.cpp: use deal/stand for blackjack control buttons now that we're not using deal for vblank
2018-11-04 17:57:08 +11:00
Westley M. Martinez
b5a54b761c HLSL Color Transforms and 3D LUT (#4043)
* Remove broken scanline uniform from post_pass

* Add 3D LUT to HLSL

* Allow individual LUTs for screen and UI

* WIP: Port 3D LUT to BGFX

* Finish porting LUT to BGFX

* Add individual phosphor color conversion for HLSL
	new file:   hlsl/chroma.fx
		Shader for converting xyY3 to sRGB
	modified:   hlsl/phosphor.fx
		Minor changes to emphasize idea that phosphors are color
agnostic
	modified:   hlsl/post.fx
		Conversion from signal RGB to xyY3
	modified:   src/osd/modules/render/d3d/d3dhlsl.cpp
	modified:   src/osd/modules/render/d3d/d3dhlsl.h
	modified:   src/osd/windows/winmain.cpp
	modified:   src/osd/windows/winmain.h

* Add phosphor examples and update presets

* Port phosphor color shaders to BGFX

* Fix missing newlines at EOF
2018-10-07 11:42:30 -04:00
W. M. Martinez
b4888aabc0 Port scanline modification to BGFX 2018-09-14 19:00:52 -07:00
Miodrag Milanovic
3917627494 Updated GENie, BGFX, BX, added BIMG since it is separated now, updated all shader binaries and MAME part of code to support new interfaces [Miodrag Milanovic] 2017-12-01 13:22:27 +01:00
Martin Lindhe
b3c2645085 fix some typos (#2772) 2017-11-03 14:58:54 +01:00
MooglyGuy
0a7da0fb67 -bgfx: Fixed xBR-lv2-multipass shader. [Ryan Holtz] 2017-06-11 19:55:47 +02:00