antonok-edm / ampli-Fe

Fully cross-platform VST2 plugin with a custom editor UI, written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI doesn't render in Ableton Live 10 on Windows

alalalexexex opened this issue · comments

Steps for repro:

  • Built using cargo build --release
  • copied .dll file to main folder for Ableton plugins
  • Open plugin as normal, but the screen is blank (white canvas).

not_working

*Note: I'm a complete novice for vst dev, and just wanted to explore where to start: i.e. In no rush, but wanted to see if I could compile something from scratch.

Thanks for the report! I don't have access to Ableton myself so this is good to know.

This is probably another issue with vst_window; I suppose Ableton does something different from the other DAWs I've tested.

@alalalexexex or others, if you have a Mac it'd be interesting to see if ampli-Fe is also broken with Ableton there.

commented

I'm using Ableton live 11 and running a release build of ampli-Fe makes it crash as well (Windows).

Scratch that, seems it doesn't crash anymore and just get a blank screen like above. Seems that #3 fixed that for me and I forgot to pull it down.

commented

@antonok-edm I finally had a minute to test it on Ableton 11 on a Mac and it seems to work without any issues, so strange that it doesn't seem to function as well on the Windows version.

image

Same issue with Bitwig 4.0.5 on Ubuntu 20.04

Screenshot_2022-01-17_11-32-40

@detrimentalist after loading an instance of ampli-Fe, could you check your Bitwig's engine logs for any errors? Should be in ~/.BitwigStudio/log/engine.log by default.

I'm using Bitwig 4.1.0 in Arch without any issues, so I suspect what you're seeing is a hardware or driver related issue in wgpu.

The only line that shows up is this:

"WARNING: lavapipe is not a conformant vulkan implementation, testing use only."

I have seen this line somewhere before, I think it has to do with selecting the wrong adapter.

So I ran the following code on my system:

instance.enumerate_adapters(wgpu::Backends::all()).for_each(|a| {
            println!("{:?}", a);
            println!("{:?}", a.get_info());
            println!("");
        });

yielding

Adapter { context: Context { type: "Native" }, id: (0, 1, Vulkan) }
AdapterInfo { name: "NVIDIA GeForce GTX 1650", vendor: 4318, device: 8066, device_type: DiscreteGpu, backend: Vulkan }

Adapter { context: Context { type: "Native" }, id: (1, 1, Vulkan) }
AdapterInfo { name: "llvmpipe (LLVM 12.0.1, 256 bits)", vendor: 65541, device: 0, device_type: Cpu, backend: Vulkan }

Adapter { context: Context { type: "Native" }, id: (2, 1, Vulkan) }
AdapterInfo { name: "NVIDIA GeForce GTX 1650", vendor: 4318, device: 8066, device_type: DiscreteGpu, backend: Vulkan }

Adapter { context: Context { type: "Native" }, id: (3, 1, Vulkan) }
AdapterInfo { name: "llvmpipe (LLVM 12.0.1, 256 bits)", vendor: 65541, device: 0, device_type: Cpu, backend: Vulkan }

OK, so I'm thinking the adapter selection code in Ampli-Fe is not robust enough. I made a hack to try to select another adapter in graphics.rs:


            let adapters: Vec<Adapter> = instance.enumerate_adapters(BackendBit::all()).filter(|a| {
                a.get_info().device_type == DeviceType::DiscreteGpu
            }).collect();

            let adapter = adapters[0].borrow();

With this change the UI renders, but this is of course not the right way to do it. I have no clue how to do it the right way tho. :)

Cheers

@detrimentalist yep, that's roughly what I expected to see. If one of the adapters works, but isn't automatically chosen by instance.request_adapter(...), then it's an issue with wgpu or your installed driver/hardware combination. You might be running into something like gfx-rs/wgpu#2397 - it'd be worth commenting there or opening another report.

Granted, ampli-Fe is pulling a version of wgpu from more than a year ago, so it may also be worth trying to update that.

@detrimentalist could you try building the update-wgpu branch? That's using the latest published wgpu version.

(I suppose others who were facing rendering issues are encouraged to try as well 😄)

Edit: update-wgpu was merged to master.

Building from the update-wgpu branch resolved the issue for me. Thanks!

commented

I finally got around to building the update-wgpu branch and I'm unfortunately still having issues. Although I did have to also make the following patches to get it to build: antonok-edm/vst_window#2

image