libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.2k stars 1.82k forks source link

Can't apply single SLANG shader not from preset with GLCORE and create new preset #10965

Closed ofry closed 4 years ago

ofry commented 4 years ago

First and foremost consider this:

Description

  1. Can't apply single SLANG shader not from preset with GLCORE and create new preset

Expected behavior

  1. I should can easily create my own preset from RA interface

Actual behavior

  1. Custom presets falling back to stock when applies.

Steps to reproduce the bug

  1. Switch Video Driver to GLCORE
  2. Restart Retroarch
  3. Open any game.
  4. Go to shaders.
  5. Add 1 shader pass, set shader 0 to "fast-bilateral.slang", shader 0 filter as "nearest", shader 0 scale to 1x.
  6. Apply changes.
[INFO] Saved shader preset to shaders\retroarch.slangp.
[INFO] [slang]: Compiling shader "C:\shaders\shaders_slang\denoisers\shaders\fast-bilateral.slang".
[ERROR] Failed to open shader file: "C:\shaders\shaders_slang\denoisers\shaders\fast-bilateral.slang".
[ERROR] Failed to compile shader: "C:\shaders\shaders_slang\denoisers\shaders\fast-bilateral.slang".
[ERROR] [GLCore]: Failed to create preset: "shaders\retroarch.slangp".
[ERROR] [GLCore]: Failed to create filter chain: "shaders\retroarch.slangp". Falling back to stock.
[INFO] [slang]: Building pass #0 (N/A)

Bisect Results

[Try to bisect and tell us when this started happening]

Version/Commit

You can find this information under Information/System Information

Environment information

Tatsuya79 commented 4 years ago
[INFO] [slang]: Compiling shader "E:\Emulateurs\RetroArch64\shaders\shaders_slang\crt\shaders\geom-deluxe\crt-geom-deluxe.slang".
[INFO] [slang]: Building pass #0 (ORIG_LINEARIZED)
[ERROR] [slang]: Non-semantic textures not supported yet.
[ERROR] [slang]: Failed to reflect SPIR-V. Resource usage is inconsistent with expectations.
[ERROR] [GLCore]: Failed to create preset: "E:\Emulateurs\RetroArch64\shaders\retroarch.slangp".
[ERROR] [GLCore]: Failed to create filter chain: "E:\Emulateurs\RetroArch64\shaders\retroarch.slangp". Falling back to stock.
[INFO] [slang]: Building pass #0 (N/A)
[INFO] [GLCore]: Not using frame history.
[INFO] [GLCore]: Not using framebuffer feedback.

Individual slang shaders lilke those in the misc folder seem to be loading fine.

It's happening on May the 1st nightly for win x64, oldest on the buildbot.

inactive123 commented 4 years ago

I don't see the problem here. Try the latest build. It seems to work fine.

Maybe explain EXACTLY the steps you are doing that don't work (and EXACTLY the steps, one by one, thoroughly)

ofry commented 4 years ago

@twinaphex @Tatsuya79 I'm edited issue with exast error.

inactive123 commented 4 years ago

Does this still happen with the latest source?

If so ,we need a bisect.

Tatsuya79 commented 4 years ago

I just tried setting a single pass with crt/shaders/crt-easymode-halation/crt-easymode-halation.glsl using the gl driver.

It failed under qt but worked under glui.

then I tried setting a single pass with crt/shaders/crt-easymode-halation/crt-easymode-halation.slang using the vulkan driver. It failed in both menus.

inactive123 commented 4 years ago

I cannot reproduce this.

We need a bisect done by somebody who can reproduce this.

Tatsuya79 commented 4 years ago

OK so that's expected from a pass within a chain which refers to a previous shader, you can not isolate it. So there is no issue it seems.

ofry commented 4 years ago

This bug I can't reproduce with fresh config, but I found new bug. Maybe it's related too.

  1. Switch Video Driver to GLCORE
  2. Restart Retroarch
  3. Open any game.
    1. Open desktop UI QT companion.
    2. Go to shaders.
    3. Set preset mdapt.slangp
    4. Add one more shader pass, set it to "fast-bilateral.slang".

Now you will get such error:

Screenshot - 06_07

Could you reproduce this? Thanks.

bslenul commented 4 years ago

Can reproduce with Desktop Menu, for some reason it puts the drive letter 2 times in path:

[INFO] [slang]: Compiling shader "D:\D:\programmes\RetroArch\shaders\shaders_slang\denoisers\shaders\fast-bilateral.slang".
[ERROR] Failed to open shader file: "D:\D:\programmes\RetroArch\shaders\shaders_slang\denoisers\shaders\fast-bilateral.slang".
[ERROR] Failed to compile shader: "D:\D:\programmes\RetroArch\shaders\shaders_slang\denoisers\shaders\fast-bilateral.slang".

And path inside retroarch.slangp is ../../../../D:/programmes/RetroArch/shaders/shaders_slang/denoisers/shaders/fast-bilateral.slang

No issue without the Desktop Menu however.

bslenul commented 4 years ago

Bisect done, started happening with this commit: 4f9a3f6813f3d90199687718f6c8116902871d5e

inactive123 commented 4 years ago

See if this fixes it -

https://github.com/libretro/RetroArch/commit/3ad0187012025bccf32a968c786358562c739489

bslenul commented 4 years ago

Yup, looks like it fixed it!

hizzlekizzle commented 4 years ago

Alright, I'll close this issue, then.