Skip to content

vdev/wm: Renderer issue tracker #33

@obiwac

Description

@obiwac

A lot of this was meant to be resolved in #32, but I wanted to merge that early, so bringing the remaining issues into here:

  • Currently, in wgpu/wgpu-core/src/instance.rs in Instance::new, I have to comment out the hal::api::Gles initialization, because this ends up calling eglInitialize (in the HAL) which hangs for some reason. Need to look into why. But also wgpu probably shouldn't bother with initializing GLES anyways if we know we're gonna use Vulkan, right?
  • Destruction??/
  • Error sink not working! Can test this by adding texture write to queue on a texture without COPY_DST.
  • Rendering isn't working properly directly on DRM. vdev/wm: Allow DRM rendering #39
  • Can't import wlroots-managed VkImages into WebGPU textures at the moment without workaround, and can't import DMA-BUFs at all.

wlroots-managed VkImage -> WebGPU texture import

Currently there are a lot of caveats to rendering using WebGPU. See #32 for details. The gist is that importing VkImages managed by wlroots for window contents into WebGPU doesn't really work (probably sync issues). At the moment, the workaround is to firstly disable DMA-BUF support in wlroots. In render/wlr_renderer.c:wlr_renderer_init_wl_display(), comment out:

if (wlr_renderer_get_texture_formats(r, WLR_BUFFER_CAP_DMABUF) != NULL &&
		wlr_renderer_get_drm_fd(r) >= 0 &&
		wlr_linux_dmabuf_v1_create_with_renderer(wl_display, 4, r) == NULL) {
	return false;
}

The other part of the workaround is for the WM device to explicitly read back texture contents with wlr_texture_read_pixels() before sending out the INTR_REDRAW_WIN interrupt. Actually, reading the pixels itself isn't the workaround, its just doing the following:

VkCommandBuffer cb = vulkan_record_stage_cb(vk_renderer);
vulkan_submit_stage_wait(vk_renderer);

This workaround allows us to work on WMs at the moment, but obviously this isn't quite ideal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    vdevVDEV-related stuff

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions