Any way to get screenshots with the Vulcan driver?

Even Bandicam seems to have issues with getting screen captures with Vulkun. Is there any way Retroarch can do it? It’s tedious to have to keep switching to GL or something else just to get screen captures.

Does the built-in screenshot function not work for you? There was a longstanding issue with vulkan screenshots where the red and blue channels were swapped, but I believe that was fixed in a recent commit.

No, it doesn’t. Using the Vulkun driver I always get a black screen. Using the latest RA with VICE x64, btw. I also can’t remap the default Screenshot key (F8) for some reason.

Well, I found out the issue. I’m using a custom cfg file with VICE x64 and I’m using custom viewports so I can fill more of the screen with the C64 screen. For some reason, it completely disables the F8 Screenshot ability. In fact, it seems to even freeze RA. If I go back to core provided Aspect Ratio instead of Custom it works fine. Is there a workaround for this?

is that only when the viewport is larger than your actual screen?

I’m guessing yes. My custom viewport aspect ratios (4:3) are

custom_viewport_height = “1464” custom_viewport_width = “1952” custom_viewport_x = “-17” custom_viewport_y = “-186”

My screen resolution on my Vizio 43" television is a fairly standard 1920x1080. I don’t think F8 Screenshot even works with GL under these conditions

Correction: it’s only the Vulkan driver that causes the issue. Switching to GL allows F8 Screenshots, even with custom viewports.

1 Like

This is still an issue with the Vulkan driver, it’s actually freezing the application, no output file is created. Switching back to GL or GLcore solves this but then the high CPU usage for the Nvidia driver, which is a known issue makes the whole thing just annoying.

Bumping this old thread, because the current git state on Rpi4 produces a black screenshot only, not freezing the app any longer. But how is it “a driver issue” for an app to dump its framebuffer, even in its raw state? :thinking:

It’s a driver issue because it works on other platforms using Vulkan, just not om that one, which has a new and still relatively experimental implementation.

Thanks for engaging. It’s clear to me when using the GPU method for a screenshot and video recording, regardless if its SDL2, GL, or Vulkan, that RA requires the driver’s API used to be implemented in a compatible manner, else NULL or a NOP occurs.

But with the GPU feature disabled for the captures, I would think that RA has the canvass handle it delegated to the core, since it can optionally apply scaling, overlays, shaders, etc. onto the framebuffers, too, regardless of driver or rendering method used, right? If anything, it should be efficient to dump a direct rendering frame to disk in a manner not unlike fbcat /dev/fb0

If that’s not the case, I’ll have to dig into the libretro API and learn more about what parts it plays with the core. It’s been more than 10 years for me since I’ve done SDL (with GL) directly or using the spiffy ClanLib SDK at the time. :nerd_face:

A git pull today did something with screenshot – it now works with vulkan-enabled Pi4 and with video_gpu_screenshot = "false", but there’s also a new thumbnail of the screenshot added to the notification. Very cool. :nerd_face: