https://bugs.documentfoundation.org/show_bug.cgi?id=164394

            Bug ID: 164394
           Summary: Skia/Vulkan initialization fails due to illegal
                    vkCreateXcbSurfaceKHR call
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: graphics stack
          Assignee: [email protected]
          Reporter: [email protected]

Description:
At startup, Skia/X11 tries to create a number of 1x1-pixel swapchains on a null
window. These calls fail on my machine, and LibreOffice falls back to using
Raster.

Validation layer output shows these calls violate the Vulkan spec:

> $ SAL_USE_VCLPLUGIN=gen SAL_FORCESKIA=1 SAL_SKIA=vulkan 
> ./instdir/program/soffice
> VUID-VkXcbSurfaceCreateInfoKHR-window-01311(ERROR / SPEC): msgNum: 1562353943 
> - Validation Error: [ VUID-VkXcbSurfaceCreateInfoKHR-window-01311 ] | 
> MessageID = 0x5d1fa117 | vkCreateXcbSurfaceKHR(): pCreateInfo->window is 
> zero. The Vulkan spec states: window must be a valid X11 xcb_window_t 
> (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-window-01311)
>     Objects: 0
> VUID-VkXcbSurfaceCreateInfoKHR-window-01311(ERROR / SPEC): msgNum: 1562353943 
> - Validation Error: [ VUID-VkXcbSurfaceCreateInfoKHR-window-01311 ] | 
> MessageID = 0x5d1fa117 | vkCreateXcbSurfaceKHR(): pCreateInfo->window is 
> zero. The Vulkan spec states: window must be a valid X11 xcb_window_t 
> (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-window-01311)
>     Objects: 0
> warn:vcl.skia:34946:34946:vcl/skia/SkiaHelper.cxx:533: Cannot create Vulkan 
> GPU context, falling back to Raster

This issue originates in LibreOffice code, not upstream Skia code. LibreOffice
passes an invalid window to Skia while constructing some temporary devices. I
haven't debugged any further than this.

Windows Skia/Vulkan works correctly on my machine. Other Linux Vulkan programs
work correctly on my machine.

Steps to Reproduce:
1. Install Vulkan validation layers for run-time debugging. On Ubuntu, this is
the vulkan-validationlayers apt package.
2. Build LibreOffice with the --enable-skia-vulkan-validation build option.
3. Run LibreOffice with Vulkan (e.g. SAL_USE_VCLPLUGIN=gen SAL_FORCESKIA=1
SAL_SKIA=vulkan)

Actual Results:
LibreOffice generates Vulkan validation errors at startup due to incorrect
Vulkan API use.

Note that LibreOffice may work on your machine, despite these errors. This bug
should be considered reproduced if these validation errors are printed, whether
or not your computer tolerates them.

Expected Results:
LibreOffice should run without Vulkan validation errors.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 496c409841d9ee71964af8a8afdc121282e69a63
CPU threads: 32; OS: Linux 6.8; UI render: Skia/Raster; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Relevant snippet from vulkaninfo:

> Presentable Surfaces:
> =====================
> GPU id : 0 (AMD Radeon RX 7900 XTX (RADV NAVI31)):
>         Surface types: count = 2
>                 VK_KHR_xcb_surface
>                 VK_KHR_xlib_surface
>         Formats: count = 2
>                 SurfaceFormat[0]:
>                         format = FORMAT_B8G8R8A8_SRGB
>                         colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
>                 SurfaceFormat[1]:
>                         format = FORMAT_B8G8R8A8_UNORM
>                         colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
>         Present Modes: count = 4
>                 PRESENT_MODE_IMMEDIATE_KHR
>                 PRESENT_MODE_MAILBOX_KHR
>                 PRESENT_MODE_FIFO_KHR
>                 PRESENT_MODE_FIFO_RELAXED_KHR

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to