Closed lotharsm closed 5 years ago
Ok, I'm working on hand-converting the GLSL shaders, so this kind of thing can happen in the process. Thanks for the report.
In the short term, is there a reason why you're wanting to use the GLSL shaders instead of Cg and/or slang?
EDIT: okay, I pushed a fix for that on the gameboy shader. If you can (wait a while for the shaders to update in the online updater and then) re-fetch them and give it another shot, let me know if it reports any other errors.
I tested again with the updated shaders, and now the Gameboy shader works fine, the other Gameboy shaders with borders enabled sadly still don't work. I wonder why the Intel driver complained about that missing version directive, while the radeon driver on my old laptop didn't.
There is no particular reason why I want to use GLSL shaders now. I just noticed they don't work on my system, so I reported that.
Is it correct that GLSL shaders are only meant as a fallback option in case Cg and/or slang is unsupported by the hardware? Will the slang shaders eventually replace the Cg shaders now that Nvidia stopped supporting Cg and put it in a legacy state? [see https://developer.nvidia.com/cg-toolkit]
Yeah, we've officially deprecated Cg, but we'll keep it around as long as Nvidia still has the libs for download.
GLSL has been a fallback in the past, but I just spent the past week hand-converting a majority of the shaders, so it should be mostly on-par with the others now. There are a few notable exceptions, like crt-royale, that simply aren't going to be ported, though.
I'll try to fix up the console-border shaders ASAP. If you find any others that aren't working, do let me know. Each vendor's compiler has its own quirks, unfortunately, so the more testing that gets done, the more I'll be able to fix.
Thank you for looking at the console-border shader. In general, it seems that nearly all shaders are affected, except the real simple ones. Btw, in which repository are the GLSL shaders located?
Now that Cg is deprecated, is slang the shader language that will be the preferred one in the future?
Yeah, I'm going to focus on keeping slang and GLSL as healthy as possible. I'll still try to keep Cg going but it's lower priority for me.
The GLSL repo is currently at https://github.com/hizzlekizzle/glsl-shaders but I'm going to probably move it under the libretro organization pretty soon, since it's mostly complete now.
Is there a way to automagically test all GLSL shader presets with the Intel GL compiler? Or do I have to test each and every shader by myself?
Btw, the shaders in handheld/console-borders are all affected.
no programmatic way that I know of, unfortunately. You can save some time by only testing the ones from my repo and not the ones from the online updater, since it includes a bunch of auto-converted shaders that I can't really do anything about.
I am currently testing the shaders from your repository.
I wonder what happens if one single shader fails to compile on a multi-pass shader? E.g. when you have a shader with 5 passes, and one shader fails to compile - will the other 4 passes be available or does RetroArch throw an error immediately?
I just finished the first 68 shaders from your repository.
Shaders that refuse to compile
Shaders that compile, but have issues
Next batch will follow tomorrow. Please also notice that all tested shader presets produce warnings about missing version directives.
Hey, this is great! Thanks for the testing.
I pushed some fixes for the crtglow and ntsc shaders, if you wouldn't mind trying those again. Any chance you can get me any of the errors on the ones that fail to compile (minus all of the version directive warnings)?
gtu-famicom and the other ntsc shaders will probably all be pink because of spotty support for float framebuffers in older OGL versions. Anything that includes crt-royale is going to be broken, too.
To make testing a bit easier, I wrote a little bash script that automatically creates a .cfg file for every .glslp file found. The created cfg file only contains a video_shader override. Then, the script automatically launches RetroArch with each generated .cfg file and exits RetroArch again after 128 frames. With this script it is possible to test entire shader directories completely unattended in a few minutes.
It only tests if the shaders will compile, but not if the shaders look as intended. Oh, and btw, the full output and only the ERROR lines are logged.
The script is available here: https://gist.github.com/rootfather/7e3ea06f1d7e546d82792307a9769da7
Here are my results. I pulled your repository at around 30 minutes ago.
Shaders that failed to compile (ignore the .cfg.error.log at the end)
./borders/gameboy-player/gameboy-player-crt-royale.glslp.cfg.error.log
./borders/gameboy-player/gameboy-player-tvout.glslp.cfg.error.log
./borders/sgb/sgb-crt-royale.glslp.cfg.error.log
./borders/sgb/sgb-tvout+interlacing.glslp.cfg.error.log
./crt/gtuv50.glslp.cfg.error.log
./dithering/bayer-matrix-dithering.glslp.cfg.error.log
./dithering/gdapt.glslp.cfg.error.log
./handheld/console-border/dmg-2x.glslp.cfg.error.log
./handheld/console-border/dmg-3x.glslp.cfg.error.log
./handheld/console-border/dmg-4x.glslp.cfg.error.log
./handheld/console-border/dmg-5x.glslp.cfg.error.log
./handheld/console-border/dmg-6x.glslp.cfg.error.log
./handheld/console-border/gb-pocket-2x.glslp.cfg.error.log
./handheld/console-border/gb-pocket-3x.glslp.cfg.error.log
./handheld/console-border/gb-pocket-4x.glslp.cfg.error.log
./handheld/console-border/gb-pocket-5x.glslp.cfg.error.log
./handheld/console-border/gb-pocket-6x.glslp.cfg.error.log
./handheld/console-border/gba-2x.glslp.cfg.error.log
./handheld/console-border/gba-3x.glslp.cfg.error.log
./handheld/console-border/gba-4x.glslp.cfg.error.log
./handheld/console-border/gba-5x.glslp.cfg.error.log
./handheld/console-border/gba-6x.glslp.cfg.error.log
./handheld/console-border/gbc-2x.glslp.cfg.error.log
./handheld/console-border/gbc-3x.glslp.cfg.error.log
./handheld/console-border/gbc-4x.glslp.cfg.error.log
./handheld/console-border/gbc-5x.glslp.cfg.error.log
./handheld/console-border/gbc-6x.glslp.cfg.error.log
./handheld/console-border/gg-2x.glslp.cfg.error.log
./handheld/console-border/gg-3x.glslp.cfg.error.log
./handheld/console-border/gg-4x.glslp.cfg.error.log
./handheld/console-border/gg-5x.glslp.cfg.error.log
./handheld/console-border/gg-6x.glslp.cfg.error.log
./handheld/console-border/old/dmg-2x-old.glslp.cfg.error.log
./handheld/console-border/old/dmg-3x.glslp.cfg.error.log
./handheld/console-border/old/dmg-4x.glslp.cfg.error.log
./handheld/console-border/old/dmg-5x.glslp.cfg.error.log
./handheld/console-border/old/dmg-6x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-2x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-3x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-4x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-5x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-6x.glslp.cfg.error.log
./handheld/console-border/old/gba-2x.glslp.cfg.error.log
./handheld/console-border/old/gba-3x.glslp.cfg.error.log
./handheld/console-border/old/gba-4x.glslp.cfg.error.log
./handheld/console-border/old/gba-5x.glslp.cfg.error.log
./handheld/console-border/old/gba-6x.glslp.cfg.error.log
./handheld/console-border/old/gbc-2x.glslp.cfg.error.log
./handheld/console-border/old/gbc-3x.glslp.cfg.error.log
./handheld/console-border/old/gbc-4x.glslp.cfg.error.log
./handheld/console-border/old/gbc-5x.glslp.cfg.error.log
./handheld/console-border/old/gbc-6x.glslp.cfg.error.log
./handheld/console-border/old/gg-2x.glslp.cfg.error.log
./handheld/console-border/old/gg-3x.glslp.cfg.error.log
./handheld/console-border/old/gg-4x.glslp.cfg.error.log
./handheld/console-border/old/gg-5x.glslp.cfg.error.log
./handheld/console-border/old/gg-6x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-2x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-3x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-4x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-5x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-6x.glslp.cfg.error.log
./handheld/console-border/old/psp-2x.glslp.cfg.error.log
./handheld/console-border/old/psp-3x.glslp.cfg.error.log
./handheld/console-border/old/psp-4x.glslp.cfg.error.log
./handheld/console-border/old/psp-5x.glslp.cfg.error.log
./handheld/console-border/old/psp-6x.glslp.cfg.error.log
./handheld/console-border/psp-2x.glslp.cfg.error.log
./handheld/console-border/psp-3x.glslp.cfg.error.log
./handheld/console-border/psp-4x.glslp.cfg.error.log
./handheld/console-border/psp-5x.glslp.cfg.error.log
./handheld/console-border/psp-6x.glslp.cfg.error.log
./handheld/lcd-shader/backup/lcd-shader.glslp.cfg.error.log
./pal/pal.glslp.cfg.error.log
./sabr/sabr-hybrid-deposterize.glslp.cfg.error.log
Error logfiles here: shader error logs.zip In addition to this, all shaders are complaining about a missing #version declaration.
Please let me know if you need the full log files too.
eyyy, that's awesome! I'm glad you were able to script it!
I think I got the console-borders, PAL and gdapt fixed. I think I know how to fix tvout-tweaks and GTU but I need to test on some other GPUs before I push it up.
Thanks for looking into this! Just ping me if it's time for another test run.
@rootfather Care to give them another shot?
I'm not sure how even begin debugging the ones like ddt and crt-geom where they compile but don't look right. On mobile/GLES, I would look at the precision first, but I don't think that's a problem with desktop OpenGL...
@hizzlekizzle, seems that you fixed a lot of the shaders.
Shaders that still won't compile
./borders/gameboy-player/gameboy-player-crt-royale.glslp.cfg.error.log
./borders/sgb/sgb-crt-royale.glslp.cfg.error.log
./dithering/bayer-matrix-dithering.glslp.cfg.error.log
./dithering/gdapt.glslp.cfg.error.log
./handheld/console-border/old/dmg-2x-old.glslp.cfg.error.log
./handheld/console-border/old/dmg-3x.glslp.cfg.error.log
./handheld/console-border/old/dmg-4x.glslp.cfg.error.log
./handheld/console-border/old/dmg-5x.glslp.cfg.error.log
./handheld/console-border/old/dmg-6x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-2x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-3x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-4x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-5x.glslp.cfg.error.log
./handheld/console-border/old/gb-pocket-6x.glslp.cfg.error.log
./handheld/console-border/old/gba-2x.glslp.cfg.error.log
./handheld/console-border/old/gba-3x.glslp.cfg.error.log
./handheld/console-border/old/gba-4x.glslp.cfg.error.log
./handheld/console-border/old/gba-5x.glslp.cfg.error.log
./handheld/console-border/old/gba-6x.glslp.cfg.error.log
./handheld/console-border/old/gbc-2x.glslp.cfg.error.log
./handheld/console-border/old/gbc-3x.glslp.cfg.error.log
./handheld/console-border/old/gbc-4x.glslp.cfg.error.log
./handheld/console-border/old/gbc-5x.glslp.cfg.error.log
./handheld/console-border/old/gbc-6x.glslp.cfg.error.log
./handheld/console-border/old/gg-2x.glslp.cfg.error.log
./handheld/console-border/old/gg-3x.glslp.cfg.error.log
./handheld/console-border/old/gg-4x.glslp.cfg.error.log
./handheld/console-border/old/gg-5x.glslp.cfg.error.log
./handheld/console-border/old/gg-6x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-2x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-3x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-4x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-5x.glslp.cfg.error.log
./handheld/console-border/old/ngpc-6x.glslp.cfg.error.log
./handheld/console-border/old/psp-2x.glslp.cfg.error.log
./handheld/console-border/old/psp-3x.glslp.cfg.error.log
./handheld/console-border/old/psp-4x.glslp.cfg.error.log
./handheld/console-border/old/psp-5x.glslp.cfg.error.log
./handheld/console-border/old/psp-6x.glslp.cfg.error.log
./handheld/lcd-shader/backup/lcd-shader.glslp.cfg.error.log
./sabr/sabr-hybrid-deposterize.glslp.cfg.error.log
Log files shader error logs.zip
Regarding shaders that compile but look wrong - is it possible that they use features that require a minimal openGL version? If so, is it possible that the Intel compiler falls back to an openGL version that is too old if a #version declaration is missing?
@lotharsm Is this still an issue with the current master?
they should be fine now.
Cool! I'll close this then, but if anyone still has an issue please let us know!
First and foremost consider this:
Description
Today, I got my new Laptop, powered by an Intel Core i5 7200U with integrated HD Graphics 620. I noticed that GLSL shaders don't work, at least not the ones with multiple passes. I couldn't test the all, but a good one to test is the shader preset "shaders_glsl/handheld/gameboy.glslp". It seems that the multipass shaders seems to be the worst, but I got some simple ones (like the simple lcd grid) working.
CG shaders work fine, SLANG shaders have some small issues (I might open a separate bug report about this)
I used the latest buildbot versions from RetroArch, the cores and obtained the latest shaders through the Online Updater. The exact same versions run fine on my old laptop featuring an AMD Radeon HD7400M, so this issue is specific to the Intel graphics solutions.
Expected behavior
GLSL shaders should work as expected.
Actual behavior
When selecting the shader preset to the menu, the menu simply returns to the previous menu without loading or applying the shader.
Log file:
Steps to reproduce the bug
Version/Commit
ec395048b
Environment information