Closed wingedonezero closed 3 years ago
If you select a external shader and try to restart bizhawk it fails to load. With the error in the picture.But this issue isnt present in BizHawk-1.11.1 But 1.11.2 and 1.11.3 It is. No external shaders work in the newer two.
This was briefly discussed on the forum, see the first two posts here: http://tasvideos.org/forum/viewtopic.php?t=12549&start=953
Ok so from what i understand is something changed. I actually have two shaders that worked in previous releases and i haven't changed the shaders or updated them at all. That post says the shader sampler needs renamed is that in the shader file then? I can upload what im working with to be tested. Its just a weird problem to me. im stuck with 1.11.1 right now.
Post your shaders. Some external shaders positively work in the newer two. Even if renaming the sampler (yes, it's in the shader file) fixes it, I want to know why you were getting a crash.
i wasn't sure of the best way to upload them but mega will have to do. I originally used cg2glsl.py to convert them. Then made my own simple preset file worked up until 1.11.2 and 1.11.3.
https://mega.nz/#!XRVz0aLL!gEblqoBwkJ59hI0U0pL2yahpo6t0j0lwqSqMvZSE4MM 7zipped Link https://mega.nz/#F!fF9gUB5I!TzLz6c_r01eC2n4Zbb2Gqw Folder Link
You shouldn't be using .glsl shaders anymore. Now .cg is employed and .glsl is not even supported. I may relax this restriction in the future, but not for now. I just committed a bunch of changes which reject your attempts to choose such a .cgp. Also, the OpenGL backend needed to be a bit more resilient against broken shaders (the intention was for shader compiling to never crash). Finally, I think I've removed the necessity of having samplers named s_p. But uhhh there are still lots of problems with shaders, especially in d3d display method.
Ok so what exact format are shaders supposed to be in. I just had a chance to test your changes. and now no shader i try works it rejects everything and Ive tried like 60 of them mostly in cg form and all say shader cannot be compiled or it rejects it. Even the included ones they fail to compile.
Ok i have Found part of the cause i use opengl backend. I just got the directx one to work for a couple of them but none seem to work for opengl at this time even the included. I jumped the gun on my last comment i didn't think to switch from opengl. I just prefer opengl to directx.
If the included shaders fail to compile, then youve got some kind of big problems I've never heard of before. Use view > display log window, and restart the emulator, and see what kind of diagnostics spew through the console
It doesn't spew out any kind of errors only the window pops up saying failed to compile shader. And it doesn't work. Steps i used was 1.switch to opengl
so what does spew out?
those are the screens of whats happening and the log window
Uhh what GPU do you have? I don't think theres anything I can do about this without debuggnig it, but maybe I can guess and get lucky and print some more stuff to the console and catch the problem
I have a amd 7970 Xfx DD edition. Now just to clarify in direct 3d the shaders included do work though..Ive tested a bunch of others as well and made a few new preset files since the first problem and they mostly work in direct3d but none work in opengl at the time being. im willing to help as much as i can though if you need anything. Im still working getting a folder together of what shaders do work if you'd like that when im done to include.
Can you help as much as installing visual studio community and debugging it yourself?
I tryed to do that but i honestly don't know how to program. I found the shader part of the code and got stuck with need a exe for the solution when i hit debug on the that section. And didnt know where to find the main part.
rightclick on BizHawk.Client.EmuHawk and pick Set as Startup Project. You can ask google lots of questions about how to debug in visual studio. Primarily here youll be looking for chatter or noise or extra errors. Liberal application of Step Into and Step Over through "Try compiling it" in DisplayConfigLite.cs should get you into the shader compiling.
'EmuHawk.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'E:\Games\Open Source\BizHawk-master\output\EmuHawk.exe'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Client.Common.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Emulation.Common.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Common.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Bizware.BizwareGL.OpenTK.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Bizware.BizwareGL.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\OpenTK.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Bizware.BizwareGL.SlimDX.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Bizware.BizwareGL.GdiPlus.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\Newtonsoft.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.031bf3856ad364e35\System.ComponentModel.DataAnnotations.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'Anonymously Hosted DynamicMethods Assembly'. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\BizHawk.Emulation.Cores.dll'. Symbols loaded. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. throttle method: 1; resolution: 4522451 loading external game database gamedb_sega_sms.txt loading external game database gamedb_sega_sg1000.txt loading external game database gamedb_sega_gg.txt loading external game database gamedb_pce_hucards.txt loading external game database gamedb_pce_cd.txt loading external game database gamedb_sega_md.txt loading external game database gamedb_a2600.txt loading external game database gamedb_coleco.txt loading external game database gamedb_gb.txt loading external game database gamedb_gbc.txt loading external game database gamedb_snes.txt loading external game database gamedb_n64.txt loading external game database gamedb_gba.txt loading external game database gamedb_lynx.txt loading external game database gamedb_appleII.txt gamedb: Multiple hash entries FB0C887C7902106A72327F9797CDD14A254E3228, duplicate detected on "Oregon Trail (Disk 1 of 2)" and "Oregon Trail (1985)(MECC)(US)(Side A)" gamedb: Multiple hash entries 8CA19D02C1B3EB35061B97F8640CC338BA129B9F, duplicate detected on "Oregon Trail (Disk 2 of 2)" and "Oregon Trail (1985)(MECC)(US)(Side B)" gamedb: Multiple hash entries FB0C887C7902106A72327F9797CDD14A254E3228, duplicate detected on "Otrail_1" and "Oregon Trail (Disk 1 of 2)" gamedb: Multiple hash entries 8CA19D02C1B3EB35061B97F8640CC338BA129B9F, duplicate detected on "Otrail_2" and "Oregon Trail (Disk 2 of 2)" gamedb: Multiple hash entries 67F5D6AA79E18905D540F7B8E01CE90E40696D44, duplicate detected on "ZZZ-UNK-Bolo - cheat version, Pest Patrol, Serpentine" and "ZZZ-UNK-Bolo - Cheat Version, Pest Patrol, Serpentine" gamedb: Multiple hash entries 67D88DDE7389FB5092C7F7826DBBE2B6D73BC2AF, duplicate detected on "ZZZ-UNK-mario [compil]" and "ZZZ-UNK-Mario [compil]" loading external game database gamedb_psx.txt gamedb: Multiple hash entries 829A295C, duplicate detected on "Monster Rancher 2 (U) (EXE Patched)" and "Monster Rancher 2 (USA)" loading external game database gamedb_neshomebrew.txt loading external game database gamedb_vs.txt BENIGN: missing external game database gamedb_user.txt loading external game database gamedb_ws'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\OpenTK.GLControl.dll'. Module was built without symbols. The thread 0x1978 has exited with code 0 (0x0). The thread 0x15ac has exited with code 0 (0x0). .txt loading external game database gamedb_wsc.txt The thread 0x1a80 has exited with code 0 (0x0). The thread 0x1c7c has exited with code 0 (0x0). The thread 0x151c has exited with code 0 (0x0). The thread 0x21a0 has exited with code 0 (0x0). 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'E:\Games\Open Source\BizHawk-master\output\SlimDX.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Selecting display size {Width=512, Height=384} Selecting display size {Width=512, Height=384} Selecting display size {Width=512, Height=384} Selecting display size {Width=512, Height=384} Selecting display size {Width=512, Height=384} Selecting display size {Width=512, Height=384} 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0b03f5f7f11d50a3a\Accessibility.dll'. Cannot find or open the PDB file. 'EmuHawk.exe' (CLR v4.0.30319: EmuHawk.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Dynamic\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Dynamic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. The thread 0x2214 has exited with code 0 (0x0). The thread 0x2610 has exited with code 0 (0x0). Selecting display size {Width=512, Height=384} Selecting display size {Width=512, Height=384} The thread 0x25f4 has exited with code 0 (0x0). The thread 0xbe4 has exited with code 0 (0x0). The thread 0x1b84 has exited with code 0 (0x0). The thread 0x267c has exited with code 0 (0x0). The thread 0x255c has exited with code 0 (0x0). The thread 0x1ab4 has exited with code 0 (0x0). The thread 0x2094 has exited with code 0 (0x0). The thread 0x2b1c has exited with code 0 (0x0). The thread 0x2838 has exited with code 0 (0x0). Object of type SlimDX.DirectInput.DirectInput was not disposed. Stack trace of object creation: Object of type SlimDX.DirectInput.Keyboard was not disposed. Stack trace of object creation: Object of type SlimDX.DirectInput.DirectInput was not disposed. Stack trace of object creation: Object of type SlimDX.DirectSound.DirectSound was not disposed. Stack trace of object creation: Object of type SlimDX.DirectSound.SecondarySoundBuffer was not disposed. Stack trace of object creation: Total of 5 objects still alive. The program '[10736] EmuHawk.exe' has exited with code 0 (0x0).
ok i did what you said and thats what came up the thread has exited happend aftter i switched to opengl restarted and tryed to use the included shaders. in debug mode in visual studio. i think the opengl driver or backend needs some support added for cg shaders. Like ive said previously it worked in opengl with glsl files in 1.11.1. I can test any thing else if you explain the steps you need.
Nothing useful there. What you would have been looking for is extra error popups. Obviously you didnt see any. Youll need to step-over and step-into the code I mentioned.
Seeing this aswell or at least something very similar... Shipped shaders work if used in D3D mode, if you switch to OpenGL you get the dreaded "Selected filter could not be compiled." Switching back to D3D almost all shaders in https://github.com/libretro/common-shaders fails to load. This is pretty much the only repo I could find having cgp shaders. Some do load but doesn't appear to work at all, no errors in the log window.
Intel HD Graphics 4000 version 10.18.10.4276 Windows 7 64-bit
Youll have to discuss individual shaders. My reply at the moment will usually be 'that shader uses a feature that isnt supported' but there may be a few which ought to work, and dont. I assure you the shipped shaders do work on opengl mode for some people. As for why they don't work for some others, it's because opengl sucks, and beyond that every single case needs to be debugged individually in detail.
Here's a few: https://github.com/libretro/common-shaders/tree/master/hqx (single-pass doesn't work either) https://github.com/libretro/common-shaders/tree/master/sabr
I did play around the filters in https://github.com/libretro/common-shaders/tree/master/xbr/shaders/legacy and those seems to work as long as you make your own cgp-file (used the hq2x one as a template) at least in D3D mode.
hqx: requires textures, not supported sabr 1.1: .cg contains errors (no texcoord semantics on the shader varyings). Then proceeds to take a long time to compile. Then it does nothing because the .cg is broken (specify scale0=2 to make it do something). Then it works. (it seems viewport scales might be broken in bizhawk at the moment, or maybe they never worked properly, I'll have to debug further) sabr 3.0: Same as sabr 1.1 but compiles immediately once problems fixed.
I had forgotten that the libretro common-shaders repository is full of complete garbage. I don't warrant that anything in there works. If you find me saying otherwise, let me know where so I can erase it.
Instead we need to start building our own repository of shaders forked from that repository and validated in bizhawk. Or you can fix them and send PRs to libretro, which is like pulling your own teeth but less pleasant.
I just added a bunch of extra exception handling to the shader compilation process which will help narrow down some of these problems.
Is 1.x development continuing?
Check the commit history in the 1.x branch for an idea
There's no development in it, and there won't be. All I'm doing there is backporting some fixes from master that I feel like backporting >_>