Mega Bezel on M1 Macs

I tried and failed to get this shader to work with RetroArch on my M1 Mac. I appreciate that this was developed by Windows users for devotees to Microsoft, but if anyone has an idea what’s going wrong here I’m all ears.

Here is the error: [INFO] [slang]: Compiling shader: “/Users/ball/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/Mega_Bezel/shaders/base/add-params-all.slang”. [INFO] [slang]: Compiling shader: “/Users/ball/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/Mega_Bezel/shaders/base/stock.slang”. [INFO] [slang]: Compiling shader: “/Users/ball/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/Mega_Bezel/shaders/base/add-negative-crop-area.slang”. [INFO] [slang]: Compiling shader: “/Users/ball/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/Mega_Bezel/shaders/base/cache-info-all-params.slang”. [ERROR] [slang]: Texture name ‘LinearizePassFeedback’ not found in semantic map, Probably the texture name or pass alias is not defined in the preset (Non-semantic textures not supported yet) [ERROR] [slang]: Failed to reflect SPIR-V. Resource usage is inconsistent with expectations.

The first archive was copied to: ~Library/Application Support/RetroArch/shaders/Mega_Bezel_Packs/CyberLab The second archive was copied to: ~/Library/Application Support/RetroArch/Filters/Video

I will note that there is already a “Mega Bezel” folder here (I presume irrelevant?): ~/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/Mega_Bezel

Any ideas?

1 Like

This is probably a question either for the RetroArch team @hunterk, @Tatsuya79 or @HyperspaceMadness to respond to. What I made are simply presets for other talented developers’ Shaders. I didn’t make any Shaders.

I hear these work fine on Linux and Android as well. So maybe it’s not that people who develop them are devoted to Microsoft.

Some people have Android devices, Linux Devices as well as iOS/OSX devices by the way. Different devices are marketed, optimized and better suited for different tasks.

Maybe this might also be a question for Apple Support. You can probably ask them, why isn’t Vulkan - an open standard, supported by Macs?

I’ll ask Apple when there is a greater than 0.0001% chance of them responding.

I don’t seem to have any issue with the other shaders. Not sure what’s going on, but I suspect I’m missing some special sauce that is in the windows release.

Definitely not irrelevant… it is required.

As @hunterk suggested… try to load one of the base Mega Bezel presets. e.g.

~/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__1__ADV__GDV.slangp

and see if you get the same error.

2 Likes

Whatever your issue is with Windows (or those poor souls who probably can’t afford to be patrons of the Apple ecosystem) this is not the place for that.

Developers have put in extra time and effort to improve compatibility with other platforms and make these wonderful works as platform agnostic as possible.

If you search through the HSM Mega Bezel Reflection Shader thread you’ll see posts by other users who have tried using these on Macs including the relatively recently released M1 Macs.

I’m sure some might have had some sort of success at least with the use of some great alternatives if not these presets. Perhaps a bit more research on the topic might be warranted.

Maybe you can try the GL Core driver or the Windows/Linux version using Parallels or something like that?

It’s only been about 1 or 2 months that many users of Microsoft Xbox Series S/X and even Windows Direct X users have been able to load and use these properly.

So you can start by trying to get some of the Default HSM Mega Bezel Reflection Shader presets working, including the Potato presets.

If not, there are several other great Shaders/Shader Preset packs that you can try which may or may not require HSM Mega Bezel Reflection Shader that might work for you in the interim.

Maybe you can even get an additional device that does things like this better. Remember every platform has its advantages and disadvantages.

Take a look here:

Using Parallels, you can probably try an Arm64 version of RetroArch and Windows 10 with the DirextX driver. I have no idea if this will work.

There’s also VMWare Fusion that you can try which can also run Linux.

2 Likes

Hm, I can’t delete my ‘pending’ posts.

Found the prefs file, but it’ll still freeze (regardless which stable or nightly build used). I’ll report back if I get anything to run again. I swear other shaders were running before and now nothing runs. Instead it will compile a bunch of stuff, show the new shader frame, but the menu is frozen so I can’t resume the emulation.

Edit: This comment was posted (approved) out of order. Deleted because it makes no sense out of order

Check /Users/[username]/Library/Application Support/RetroArch/

1 Like

@hunterk is it possible to split and move from Ball’s first post into a more appropriate thread please?

It’s kinda crowding my most recent preset screenshot examples and people who are trying to run Mega Bezel with M1 Macs should probably have their own thread by now where they can all share their unique experiences and what they had to do to resolve them in one special permanent place.

1 Like

Thanks very much sir. @hunterk

I really hope whatever issue or issues that are preventing Mac users and especially M1 Mac users from enjoying these beautiful Shaders and presets can be worked out or at least worked around and ultimately resolved.

Looking forward to seeing more feedback from devs and users alike.

Got a M1 Air as well - complex shader presets like like Mega Bezel are failed to load with error like this: [ERROR] [Metal]: unable to compile fragment shader: program_source:1607:277: fatal error: bracket nesting level exceeded maximum of 256 program_source:1607:277: note: use -fbracket-depth=N to increase maximum nesting level. Looks like a shader compiler issue.

2 Likes

Just as @hunterk suggested, MBZ preset loaded from main sland shaders folder works without a hitch. @Cyber preset - not so much. Verbose log here: https://pastebin.com/QvsDtd2G

1 Like

Alec, I got that error too with some shaders, but others it loads, changes the screen, but then the app freezes. Also sometimes it goes into a compile loop where it tries to compile it over and over again.

Edit: The menu freezes, but you can still quit the app from the Dock (without force quitting)

1 Like

OK, I found out that if the menu freezes (and other weirdness) I have to reboot my Mac (not just the app) for it to work again.

After rebooting I can load some bezel shaders like: MBZ__1__ADV__EASYMODE.slangp

no problem.

Edit: I’m having difficulty figuring out why some shaders work and others don’t. For example this one works:

MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp

but this one does not:

MBZ__0__SMOOTH-ADV-GLASS__LCD-GRID.slangp

The errors are different depending on the shader, this one:

[INFO] [slang]: Compiling shader: "/Users/ball/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/Mega_Bezel/shaders/lcd-cgwg/hsm-lcd-grid-v2.slang".
[ERROR] [Metal]: unable to compile fragment shader: Compilation failed:

program_source:802:11: warning: unused variable 'res_mult_size_sum_feedback'
    float res_mult_size_sum_feedback = 0.0;
          ^
program_source:804:11: warning: unused variable 'res_mult_size2_sum_feedback'
    float res_mult_size2_sum_feedback = 0.0;
          ^
program_source:1793:20: warning: unused variable 'extra_curvature_mult'
            float2 extra_curvature_mult = HSM_GetCurvatureScales(param_6, global);
                   ^
program_source:1807:22: warning: unused variable 'pixel_to_video_uv'
            float2x2 pixel_to_video_uv = param_17;
                     ^
program_source:1762:12: warning: unused variable 'original_size'
    float2 original_size = HSM_GetRotatedNegativeCropAddedSize(global, HSM_ROTATE_CORE_IMAGE);
           ^
program_source:1976:12: warning: unused variable 'core_prepped_size'
    float2 core_prepped_size = HSM_GetRotatedNegativeCropAddedSize(global, HSM_ROTATE_CORE_IMAGE);
           ^
program_source:1999:12: warning: unused variable 'raw_coord'
    float2 raw_coord = pixel_coord / ROTATED_CORE_PREPPED_SIZE;
           ^
program_source:2447:12: error: redefinition of 'param' with a different type: 'float2' (vector of 2 'float' values) vs 'const constant Push &'
    float2 param = in.vTexCoord;
           ^
program_source:2021:103: note: previous definition is here
fragment main0_out main0(main0_in in [[stage_in]], constant UBO& global [[buffer(0)]], constant Push& param [[buffer(1)]], texture2d<float> Source [[texture(2)]], texture2d<float> InfoCachePass [[texture(3)]], sampler SourceSmplr [[sampler(2)]], sampler InfoCachePassSmplr [[sampler(3)]])
                                                                                                      ^
program_source:2448:39: error: no matching function for call to 'HSM_GetViewportCoordWithZoomAndPan'
    float2 viewportCoordTransformed = HSM_GetViewportCoordWithZoomAndPan(param, HSM_VIEWPORT_ZOOM, HSM_VIEWPORT_POSITION_X, HSM_VIEWPORT_POSITION_Y, HSM_FLIP_VIEWPORT_VERTICAL, HSM_FLIP_VIEWPORT_HORIZONTAL);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
program_source:707:8: note: candidate function not viable: no known conversion from 'const constant Push' to 'const float2' (vector of 2 'float' values) for 1st argument
float2 HSM_GetViewportCoordWithZoomAndPan(thread const float2& viewport_coord, thread float& HSM_VIEWPORT_ZOOM, thread float& HSM_VIEWPORT_POSITION_X, thread float& HSM_VIEWPORT_POSITION_Y, thread float& HSM_FLIP_VIEWPORT_VERTICAL, thread float& HSM_FLIP_VIEWPORT_HORIZONTAL)
       ^
1 Like

I’ve also noticed that

MBZ__2__ADV-GLASS__GDV.slangp

works perfectly in windowed mode, but is really, really slow in fullscreen mode despite only having 2x the screen real estate. Thankfully this isn’t a problem with all the shaders and I found a few that fun fine fullscreen like

MBZ__5__POTATO__GDV.slangp

Hopefully sometime soon I’ll be able to try out your other cool shaders, but I’m happy for now using this one :slightly_smiling_face:

1 Like

Thanks for this. Can you make a list or a table showing which HSM Mega Bezel Reflection Shader default presets work for you and which don’t?

Also can you make a list or table showing the same for CyberLab Mega Bezel Death To Pixels Shader Preset Pack presets please?

Most of my Shader presets use the MBZ__0__SMOOTH-ADV_GDV.slangp Mega Bezel base preset. You can locate the instances where you see MBZ__0__SMOOTH-ADV_GDV.slangp and replace them with MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp and see if my presets start working for you now.

In order to do this you would need to edit my Shader Presets by the way and change the very first line that says “Reference”. You can let me know if you’re able to do so.

Have you tried any of the “No-Reflect” base presets?

Okay so you’re making some progress here.

There’s a folder in my preset pack which includes a few MBZ__5__POTATO_GDV-MINI.slangp presets.

You can try those and let us know if and how they work for you.

I’m no shader developer but it looks like there could be some compatibility or syntax issues with Metal and the slang shader format/version that’s being used in some of the slangp shaders.

Either that or their might be some quirks in Metal which break proper .slangp support.

Let’s hope that there are some brilliant folks here who can figure out what it is and if there’s a feasible solution.

@Ball I await your feedback on my suggestions.

@alec92 You can also try the same suggestions.

I didn’t see that one in your pack, but I was able to load this one just fine:

~Library/Application Support/RetroArch/shaders/Mega_Bezel_Packs/CyberLab/MBZ__5__Potato_No_Reflections/1080p_Optimized_Presets/CyberLab Mobile or Low Spec.slangp

1 Like

There you go. This is the folder I was referring to.

I’m looking forward to seeing your results after swapping the MBZ__0__SMOOTH-ADV_GDV.slangp base preset with the MBZ__0__SMOOTH-ADV-GLASS__GDV.slangp base preset in my presets.

FWIW both presets in that folder load fine

1 Like

The one that says “.…for Blargg…” is intended to be used with either one of my Custom Blargg NTSC Video Filter Presets or the Blargg NTSC Video Filter in the core options of emulators.

For NES Emulator Core provided Blargg Filter Presets I recommend S-Video or RGB because Composite has too severe artifacts.