gtk issueshttps://gitlab.gnome.org/GNOME/gtk/-/issues2024-02-10T02:38:42Zhttps://gitlab.gnome.org/GNOME/gtk/-/issues/4216gtk4-widget-factory fails with GSK_RENDERER=vulkan and x112024-02-10T02:38:42ZJohn Frankishgtk4-widget-factory fails with GSK_RENDERER=vulkan and x11Using gtk-4.4.0, gtk4-widget-factory fails with GSK_RENDERER=vulkan with x11. It works in wayland.
```
GSK_RENDERER=vulkan gtk4-widget-factory
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-thread...Using gtk-4.4.0, gtk4-widget-factory fails with GSK_RENDERER=vulkan with x11. It works in wayland.
```
GSK_RENDERER=vulkan gtk4-widget-factory
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
gtk4-widget-factory: xcb_io.c:260: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted
```https://gitlab.gnome.org/GNOME/gtk/-/issues/6033[4.12.0] -Dvulkan=enabled build fails -Werror=int-conversion (Clang >= 15 def...2024-02-10T02:38:31ZJan Beich[4.12.0] -Dvulkan=enabled build fails -Werror=int-conversion (Clang >= 15 default) on 32-bit architecturesRegressed by [llvm@7068aa98412a](https://github.com/llvm/llvm-project/commit/7068aa98412a) since 684a015c9852 (first bad). Related to `VK_USE_64_BIT_PTR_DEFINES` in Vulkan-Headers. From [error log](https://pkg-status.freebsd.org/beefy17/...Regressed by [llvm@7068aa98412a](https://github.com/llvm/llvm-project/commit/7068aa98412a) since 684a015c9852 (first bad). Related to `VK_USE_64_BIT_PTR_DEFINES` in Vulkan-Headers. From [error log](https://pkg-status.freebsd.org/beefy17/data/main-i386-default/pf68709c1b069_s8b4a3fbdd5/logs/errors/gtk4-4.12.0.log):
```c
$ pkg install llvm16
$ export CC=clang16 CXX=clang++16 CFLAGS=-m32
$ meson setup -Dvulkan=enabled /tmp/gtk_build
$ meson compile --ninja-args=-k0 -C /tmp/gtk_build
[...]
../gtk/gdk/gdkvulkancontext.c:1158:3: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'VkPipelineCache' (aka 'unsigned long long') [-Wint-conversion]
g_return_val_if_fail (GDK_IS_VULKAN_CONTEXT (self), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmessages.h:660:16: note: expanded from macro 'g_return_val_if_fail'
return (val); \
^~~~~
../gtk/gdk/gdkvulkancontext.c:1653:30: error: incompatible pointer to integer conversion passing 'gpointer' (aka 'void *') to parameter of type 'VkShaderModule' (aka 'unsigned long long') [-Wint-conversion]
value,
^~~~~
/usr/include/vulkan/vulkan_core.h:4410:49: note: passing argument to parameter 'shaderModule' here
VkShaderModule shaderModule,
^
../gtk/gdk/gdkvulkancontext.c:1693:10: error: incompatible pointer to integer conversion assigning to 'VkShaderModule' (aka 'unsigned long long') from 'gpointer' (aka 'void *') [-Wint-conversion]
shader = g_hash_table_lookup (self->vk_shader_modules, resource_name);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../gtk/gdk/gdkvulkancontext.c:1714:79: error: incompatible integer to pointer conversion passing 'VkShaderModule' (aka 'unsigned long long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
g_hash_table_insert (self->vk_shader_modules, g_strdup (resource_name), shader);
^~~~~~
/usr/include/glib-2.0/glib/ghash.h:74:61: note: passing argument to parameter 'value' here
gpointer value);
^
../gtk/gsk/vulkan/gskvulkanrender.c:538:12: error: incompatible pointer to integer conversion assigning to 'VkPipeline' (aka 'unsigned long long') from 'gpointer' (aka 'void *') [-Wint-conversion]
pipeline = g_hash_table_lookup (self->pipeline_cache, &cache_key);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../gtk/gsk/vulkan/gskvulkanrender.c:633:96: error: incompatible integer to pointer conversion passing 'VkPipeline' (aka 'unsigned long long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
g_hash_table_insert (self->pipeline_cache, g_memdup (&cache_key, sizeof (PipelineCacheKey)), pipeline);
^~~~~~~~
/usr/include/glib-2.0/glib/ghash.h:74:61: note: passing argument to parameter 'value' here
gpointer value);
^
../gtk/gsk/vulkan/gskvulkanrender.c:653:15: error: incompatible pointer to integer conversion assigning to 'VkRenderPass' (aka 'unsigned long long') from 'gpointer' (aka 'void *') [-Wint-conversion]
render_pass = g_hash_table_lookup (self->render_pass_cache, &cache_key);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../gtk/gsk/vulkan/gskvulkanrender.c:697:101: error: incompatible integer to pointer conversion passing 'VkRenderPass' (aka 'unsigned long long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
g_hash_table_insert (self->render_pass_cache, g_memdup (&cache_key, sizeof (RenderPassCacheKey)), render_pass);
^~~~~~~~~~~
/usr/include/glib-2.0/glib/ghash.h:74:61: note: passing argument to parameter 'value' here
gpointer value);
^
../gtk/gsk/vulkan/gskvulkanrender.c:1016:34: error: incompatible pointer to integer conversion passing 'gpointer' (aka 'void *') to parameter of type 'VkPipeline' (aka 'unsigned long long') [-Wint-conversion]
vkDestroyPipeline (device, value, NULL);
^~~~~
/usr/include/vulkan/vulkan_core.h:4454:49: note: passing argument to parameter 'pipeline' here
VkPipeline pipeline,
^
../gtk/gsk/vulkan/gskvulkanrender.c:1024:36: error: incompatible pointer to integer conversion passing 'gpointer' (aka 'void *') to parameter of type 'VkRenderPass' (aka 'unsigned long long') [-Wint-conversion]
vkDestroyRenderPass (device, value, NULL);
^~~~~
/usr/include/vulkan/vulkan_core.h:4543:49: note: passing argument to parameter 'renderPass' here
VkRenderPass renderPass,
^
```https://gitlab.gnome.org/GNOME/gtk/-/issues/1102gsk: implement shadow nodes for vulkan2024-02-10T02:38:31ZMatthias Clasengsk: implement shadow nodes for vulkanWe should have a non-fallback implementation of shadow nodes.We should have a non-fallback implementation of shadow nodes.https://gitlab.gnome.org/GNOME/gtk/-/issues/925vulkan: implement blur for outset shadows2024-02-10T02:38:31ZBugzillavulkan: implement blur for outset shadows## Submitted by Matthias Clasen `@matthiasc`
**[Link to original bug (#788350)](https://bugzilla.gnome.org/show_bug.cgi?id=788350)**
## Description
this is the one major source of cairo fallback and texture upload that we have left## Submitted by Matthias Clasen `@matthiasc`
**[Link to original bug (#788350)](https://bugzilla.gnome.org/show_bug.cgi?id=788350)**
## Description
this is the one major source of cairo fallback and texture upload that we have lefthttps://gitlab.gnome.org/GNOME/gtk/-/issues/4107vkQueuePresentKHR(): The logical or physical device has been lost.2024-02-10T02:37:46ZbaybalvkQueuePresentKHR(): The logical or physical device has been lost.<!--
Please, read the CONTRIBUTING.md guide on how to file a new issue.
https://gitlab.gnome.org/GNOME/gtk/-/blob/master/CONTRIBUTING.md
-->
## Steps to reproduce
<!--
Please, explain the sequence of actions necessary to reproduc...<!--
Please, read the CONTRIBUTING.md guide on how to file a new issue.
https://gitlab.gnome.org/GNOME/gtk/-/blob/master/CONTRIBUTING.md
-->
## Steps to reproduce
<!--
Please, explain the sequence of actions necessary to reproduce the
crash
-->
1. run /usr/bin/gtk4-widget-factory or any gtk 4.0 application
2. you will see empty window
3. when ran with `GSK_RENDERER=vulkan GDK_DEBUG=vulkan`, you will get `vkQueuePresentKHR(): The logical or physical device has been lost. (-4)`
<!--
You should try and reproduce with the demos applications available
under the `demos` directory, or the test programs in the `tests` directory.
Alternatively, please attach a *small and self-contained* example that
exhibits the issue.
-->
## Version information
<!--
- Which version of GTK you are using
- What operating system and version
- for Linux, which distribution
- If you built GTK yourself, the list of options used to configure the build
-->
- glib 2.68.3
- gtk 4.2.1
- vulkan-headers 1.2.179
- vulkan-tools 1.2.179
- vulkan-layers 1.2.179
- vulkan-loader 1.2.179
## Warnings
<!--
- If the application generates warning messages before crashing please
report them here
-->
```
Extension available: VK_KHR_device_group_creation v0.0.1
Extension available: VK_KHR_display v0.0.23
Extension available: VK_KHR_external_fence_capabilities v0.0.1
Extension available: VK_KHR_external_memory_capabilities v0.0.1
Extension available: VK_KHR_external_semaphore_capabilities v0.0.1
Extension available: VK_KHR_get_display_properties2 v0.0.1
Extension available: VK_KHR_get_physical_device_properties2 v0.0.2
Extension available: VK_KHR_get_surface_capabilities2 v0.0.1
Extension available: VK_KHR_surface v0.0.25
Extension available: VK_KHR_surface_protected_capabilities v0.0.1
Extension available: VK_KHR_xcb_surface v0.0.6
Extension available: VK_KHR_xlib_surface v0.0.6
Extension available: VK_EXT_acquire_xlib_display v0.0.1
Extension available: VK_EXT_debug_report v0.0.10
Extension available: VK_EXT_direct_mode_display v0.0.1
Extension available: VK_EXT_display_surface_counter v0.0.1
Extension available: VK_EXT_debug_utils v0.0.2
Layer available: VK_LAYER_MESA_device_select v1.2.73 (Linux device selection layer)
Layer available: VK_LAYER_KHRONOS_validation v1.2.179 (Khronos Validation Layer)
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
Vulkan Device 0:
Intel(R) UHD Graphics 620 (KBL GT2) (Integrated GPU)
Vendor ID: 0x8086u
Device ID: 0x5917u
API version 1.2.177
Queue 0: graphics/compute/transfer
Using Vulkan device 0, queue 0
vkQueuePresentKHR(): The logical or physical device has been lost. (-4)
vkQueuePresentKHR(): The logical or physical device has been lost. (-4)
vkQueuePresentKHR(): The logical or physical device has been lost. (-4)
vkQueuePresentKHR(): The logical or physical device has been lost. (-4)
```
## Backtrace
<!--
- Attaching a stack trace obtained using GDB is appreciated; follow the
instructions on the wiki:
https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces
-->
Please advise what function to set the break onhttps://gitlab.gnome.org/GNOME/gtk/-/issues/1563gtk4 vulkan hangs with haswell gpu2024-02-10T02:37:30ZJohn Frankishgtk4 vulkan hangs with haswell gpuThe vulkan vkcube test runs in X11 and wayland without problems on a intel haswell laptop.
Does gtk4 support the haswell gpu?
Using gtk4 from git:
X11 - gtk4-widget-factory hangs entire display
wayland - vulkan window does not open
...The vulkan vkcube test runs in X11 and wayland without problems on a intel haswell laptop.
Does gtk4 support the haswell gpu?
Using gtk4 from git:
X11 - gtk4-widget-factory hangs entire display
wayland - vulkan window does not open
```
$ GDK_VULKAN_DEVICE=list GSK_RENDERER=vulkan gtk4-widget-factory
INTEL-MESA: warning: Haswell Vulkan support is incomplete
Vulkan Device 0:
Intel(R) Haswell Mobile (Integrated GPU)
Vendor ID: 0x8086u
Device ID: 0xA16u
API version 1.0.57
Queue 0: graphics/compute/transfer
Using renderer of type 'GskVulkanRenderer' for surface 'GdkWaylandSurface'
[then nothing]
```https://gitlab.gnome.org/GNOME/gtk/-/issues/5750Vulkan Roadmap2024-01-09T12:58:15ZGeorges Basile Stavracas NetoVulkan RoadmapBasically all that I think will be needed to put Vulkan back in the spotlights.
### GSK
* [ ] Vulkan Images Library
* [ ] Introduce GskVulkanImageLibrary
* [ ] Port GskVulkanGlyphCache to it
* [ ] Introduce GskVulkanShadowLib...Basically all that I think will be needed to put Vulkan back in the spotlights.
### GSK
* [ ] Vulkan Images Library
* [ ] Introduce GskVulkanImageLibrary
* [ ] Port GskVulkanGlyphCache to it
* [ ] Introduce GskVulkanShadowLibrary
* [ ] Implement fallback nodes
* [ ] Outset shadow (https://gitlab.gnome.org/GNOME/gtk/-/issues/925)
* [ ] Inset shadow (https://gitlab.gnome.org/GNOME/gtk/-/issues/925)
* [ ] Shadow (https://gitlab.gnome.org/GNOME/gtk/-/issues/1102)
* [ ] 3D clips
* [ ] Fix remaining invalid API usage
* [x] Untimely buffer destruction (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5832)
* [ ] Out-of-bounds damage rects on resize
* [ ] GskVulkanShaderNode
### GDK
* [ ] GdkVulkanTexture
* [ ] Move VkSurfaceKHR to GdkSurface
* [ ] Obsolete GdkVulkanContext
### GTK
* [ ] GtkVulkanArea
* [ ] GtkSnapshot API for Vulkan shaders
## Potential Exploration
* [ ] Bindless rendering
* [ ] GL interophttps://gitlab.gnome.org/GNOME/gtk/-/issues/924vulkan: fallback code for node-as-texture doesn't handle scaling right2023-04-14T12:30:52ZBugzillavulkan: fallback code for node-as-texture doesn't handle scaling right## Submitted by Matthias Clasen `@matthiasc`
**[Link to original bug (#788348)](https://bugzilla.gnome.org/show_bug.cgi?id=788348)**
## Description
We ignore the current mvp, and always create a cairo surface with the dimensions of ...## Submitted by Matthias Clasen `@matthiasc`
**[Link to original bug (#788348)](https://bugzilla.gnome.org/show_bug.cgi?id=788348)**
## Description
We ignore the current mvp, and always create a cairo surface with the dimensions of the node bounds. When there are scales involved, this leads to blurry/blocky rendering.
Instead, what should happen here is that we transform the mode bounds to screen coordinates to determine how many pixels we ideally need, and use that to size the surface.https://gitlab.gnome.org/GNOME/gtk/-/issues/5038Vulkan renderer draws window transparent - only draws dirty area2023-04-05T12:39:08ZStephan VedderVulkan renderer draws window transparent - only draws dirty area## Steps to reproduce
1. Enable the vulkan renderer (`GSK_RENDERER=vulkan`)
2. Run the fishbowl demo (`gtk4-demo --run fishbowl`)
## Current behavior
The window starts to be completly transparent when starting. When the icon starts ...## Steps to reproduce
1. Enable the vulkan renderer (`GSK_RENDERER=vulkan`)
2. Run the fishbowl demo (`gtk4-demo --run fishbowl`)
## Current behavior
The window starts to be completly transparent when starting. When the icon starts moving more and more parts of the window get drawn.
Some parts of the window keep being transparent forever (headerbear, border).
## Expected outcome
The entire window is visible from the start.
## Version information
Current main branch (636827800525770715bba96671edb2fc0234ccc2)
## Additional information
I tested this with 2 hardware configurations:
- GTX 1050 TI (propietary NVidia drivers) on X11. Manjaro
- AMD Ryzen 5 3500U (integrated Vega graphics) on Wayland. Ubuntu 22.04
behaviour for both was identical, so i don't think this is a driver issue exclusive to NVidia / specific to X11.
[simplescreenrecorder-2022-07-12_09.45.42.mkv](/uploads/fe4462aa6dee7f4a7c1cf62824eec11f/simplescreenrecorder-2022-07-12_09.45.42.mkv)
![image](/uploads/58c9d08141277755277afe05f131eb0a/image.png)
![image](/uploads/e2b27353e5ba5839918dddf42cd9893f/image.png)
![image](/uploads/da95d1d273ae76d08bf3ef53970c0b3b/image.png)https://gitlab.gnome.org/GNOME/gtk/-/issues/3522gdkvulkancontext.c: Problem with VK_HEADER_VERSION 1412020-12-29T16:36:11ZKjell Ahlstedtgdkvulkancontext.c: Problem with VK_HEADER_VERSION 141After upgrading to Ubuntu 20.10 I got problems when I tried to compile gdkvulkancontext.c.
Lines 228-230:
```
#if VK_HEADER_VERSION < 142
case VK_RESULT_RANGE_SIZE:
#endif
```
My version of vulkan contains, in vulcan_core.h:
```
#def...After upgrading to Ubuntu 20.10 I got problems when I tried to compile gdkvulkancontext.c.
Lines 228-230:
```
#if VK_HEADER_VERSION < 142
case VK_RESULT_RANGE_SIZE:
#endif
```
My version of vulkan contains, in vulcan_core.h:
```
#define VK_HEADER_VERSION 141
```
but none of vulkan's header files define VK_RESULT_RANGE_SIZE.
Commit 4310f24a4eec66ed701500bd56d787c9b5261b33 changed the #if statement.
Previously it was `#if VK_HEADER_VERSION < 140`.
What's wrong? gdkvulkancontext.c or the vulkan version in Ubuntu 20.10?https://gitlab.gnome.org/GNOME/gtk/-/issues/2298Window is not showing up for GSK Vulkan2020-09-25T06:27:18ZDickens A SWindow is not showing up for GSK Vulkanwhen I set “GSK_RENDERER” as “vulkan” in windows 10 environment variables the window stays at the system tray and never launches, same application works proper for cairo
when I right click the system tray, it says “Posix Thread” when I ...when I set “GSK_RENDERER” as “vulkan” in windows 10 environment variables the window stays at the system tray and never launches, same application works proper for cairo
when I right click the system tray, it says “Posix Thread” when I click on it, the window replicates, but never showshttps://gitlab.gnome.org/GNOME/gtk/-/issues/2262Create render nodes for radial gradients2020-09-19T15:49:16ZTimm BäderCreate render nodes for radial gradientsOtherwise we fall back to cairo and are very slow.Otherwise we fall back to cairo and are very slow.https://gitlab.gnome.org/GNOME/gtk/-/issues/1283Blur shader improvements2020-09-14T13:00:13ZeyelashBlur shader improvementsThe current blur shaders for the OpenGL and Vulkan GSK renderers are far from optimal (especially for large radii).
Here are some possible improvements:
- Separate the horizontal and the vertical pass.
- Use linear filtering to reduce t...The current blur shaders for the OpenGL and Vulkan GSK renderers are far from optimal (especially for large radii).
Here are some possible improvements:
- Separate the horizontal and the vertical pass.
- Use linear filtering to reduce the number of texture lookups.
- Calculate the gauss coefficient incrementally (see [GPU Gems 3, chapter 40](https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html)).
- Handle large radii by downscaling, blurring and then scaling up again.
- Use a (dual) Kawase filter (see [SIGGRAPH 2015, Bandwidth-Efficient Rendering by Marius Bjørge](https://community.arm.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-20-66/siggraph2015_2D00_mmg_2D00_marius_2D00_notes.pdf)).
[This blog post](https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms) and [this presentation](https://community.arm.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-20-66/siggraph2015_2D00_mmg_2D00_marius_2D00_notes.pdf) give a nice overview on GPU-based blur algorithms.
Possibly relevant:
https://phabricator.kde.org/D9848
https://github.com/elementary/gala/pull/224
https://github.com/servo/webrender/pull/1716
https://github.com/servo/webrender/pull/1961
https://github.com/servo/webrender/issues/2821https://gitlab.gnome.org/GNOME/gtk/-/issues/2010Crash when trying to initialize the Vulkan renderer on Nvidia binary driver2020-09-11T22:10:11ZTimm BäderCrash when trying to initialize the Vulkan renderer on Nvidia binary driver```
#0 gdk_x_error (xdisplay=0x47d7d0, error=0x7fffffffb730) at ../gdk/x11/gdkmain-x11.c:249
#1 0x00007ffff5cfa402 in _XError () from /lib64/libX11.so.6
#2 0x00007ffff5cf7297 in ?? () from /lib64/libX11.so.6
#3 0x00007ffff5cf733d in ...```
#0 gdk_x_error (xdisplay=0x47d7d0, error=0x7fffffffb730) at ../gdk/x11/gdkmain-x11.c:249
#1 0x00007ffff5cfa402 in _XError () from /lib64/libX11.so.6
#2 0x00007ffff5cf7297 in ?? () from /lib64/libX11.so.6
#3 0x00007ffff5cf733d in ?? () from /lib64/libX11.so.6
#4 0x00007ffff5cf82b0 in _XReply () from /lib64/libX11.so.6
#5 0x00007ffff5cf3b01 in XSync () from /lib64/libX11.so.6
#6 0x00007ffff5cf3b9f in ?? () from /lib64/libX11.so.6
#7 0x00007ffff5bac794 in XSyncDestroyCounter () from /lib64/libXext.so.6
#8 0x00007ffff7be791f in gdk_toplevel_x11_free_contents (toplevel=0x1f14f10, display=0x4b3030)
at ../gdk/x11/gdksurface-x11.c:955
#9 gdk_x11_surface_destroy (surface=0x4ce480, foreign_destroy=0) at ../gdk/x11/gdksurface-x11.c:978
#10 0x00007ffff7bb508f in _gdk_surface_destroy_hierarchy (foreign_destroy=0, surface=0x4ce480) at ../gdk/gdksurface.c:904
#11 _gdk_surface_destroy_hierarchy (surface=0x4ce480, foreign_destroy=0) at ../gdk/gdksurface.c:896
#12 0x00007ffff7bb52db in gdk_surface_destroy (surface=0x4ce480) at ../gdk/gdksurface.c:965
#13 0x00007ffff7b4d5e3 in init_vulkan (gen=gen@entry=0x1cab580) at ../gtk/inspector/general.c:395
#14 0x00007ffff7b4dd17 in gtk_inspector_general_init (gen=0x1cab580) at ../gtk/inspector/general.c:797
#15 0x00007ffff72a1b1e in g_type_create_instance (type=<optimized out>) at ../../../../jhbuild/checkout/glib/gobject/gtype.c:1864
#16 0x00007ffff72843e8 in g_object_new_internal (class=class@entry=0x582900, params=params@entry=0x0, n_params=n_params@entry=0)
at ../../../../jhbuild/checkout/glib/gobject/gobject.c:1805
#17 0x00007ffff7285a95 in g_object_new_with_properties (object_type=31856800, n_properties=0, names=0x0, values=0x0)
at ../../../../jhbuild/checkout/glib/gobject/gobject.c:1973
#18 0x00007ffff78b38a0 in _gtk_builder_construct (builder=0x7fffd40031d0, info=0xcef980, error=0x7fffffffc0b8)
at ../gtk/gtkbuilder.c:781
--Type <RET> for more, q to quit, c to continue without paging--
#19 0x00007ffff7abdbc5 in builder_construct (data=<optimized out>, error=0x7fffffffc0b8, object_info=0xcef980)
at ../gtk/gtkbuilderparser.c:140
#20 builder_construct (object_info=object_info@entry=0xcef980, error=error@entry=0x7fffffffc0b8, data=<optimized out>)
at ../gtk/gtkbuilderparser.c:125
#21 0x00007ffff7abf344 in end_element (error=0x7fffffffc0b8, user_data=0x7fffffffc150, element_name=<optimized out>,
context=<optimized out>) at ../gtk/gtkbuilderparser.c:1080
#22 end_element (context=<optimized out>, element_name=<optimized out>, user_data=0x7fffffffc150, error=0x7fffffffc0b8)
at ../gtk/gtkbuilderparser.c:1007
#23 0x00007ffff7513992 in emit_end_element (context=context@entry=0x1accbc0, error=error@entry=0x7fffffffc218)
at ../../../../jhbuild/checkout/glib/glib/gmarkup.c:1093
#24 0x00007ffff7514861 in g_markup_parse_context_parse (context=0x1accbc0,
text=text@entry=0x7ffff7dcfe68 <_gtk_resource_data+975144> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<interface domain=\"gtk40\"><object class=\"GtkAdjustment\" id=\"magnification_adjustment\"><property name=\"lower\">1.0</property><property name=\"upper\">5.0</property><"..., text_len=<optimized out>, text_len@entry=14347, error=error@entry=0x7fffffffc218)
at ../../../../jhbuild/checkout/glib/glib/gmarkup.c:1261
#25 0x00007ffff7abf8f6 in _gtk_builder_parser_parse_buffer (builder=builder@entry=0x7fffd40031d0,
filename=filename@entry=0x7ffff7c3b79d "<input>",
buffer=buffer@entry=0x7ffff7dcfe68 <_gtk_resource_data+975144> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<interface domain=\"gtk40\"><object class=\"GtkAdjustment\" id=\"magnification_adjustment\"><property name=\"lower\">1.0</property><property name=\"upper\">5.0</property><"..., length=length@entry=14347, requested_objs=requested_objs@entry=0x0,
error=error@entry=0x7fffffffc218) at ../gtk/gtkbuilderparser.c:1270
#26 0x00007ffff78b1ae2 in gtk_builder_extend_with_template (builder=builder@entry=0x7fffd40031d0, widget=widget@entry=0x1ab2470,
template_type=template_type@entry=30436592,
--Type <RET> for more, q to quit, c to continue without paging--
buffer=0x7ffff7dcfe68 <_gtk_resource_data+975144> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<interface domain=\"gtk40\"><object class=\"GtkAdjustment\" id=\"magnification_adjustment\"><property name=\"lower\">1.0</property><property name=\"upper\">5.0</property><"..., length=length@entry=14347, error=error@entry=0x7fffffffc288) at ../gtk/gtkbuilder.c:1236
#27 0x00007ffff7a9cdce in gtk_widget_init_template (widget=0x1ab2470) at ../gtk/gtkwidget.c:12164
#28 0x00007ffff7b65fb9 in gtk_inspector_window_init (iw=0x1ab2470) at ../gtk/inspector/window.c:190
#29 0x00007ffff72a1b1e in g_type_create_instance (type=<optimized out>) at ../../../../jhbuild/checkout/glib/gobject/gtype.c:1864
#30 0x00007ffff72843e8 in g_object_new_internal (class=class@entry=0x1ab6400, params=params@entry=0x7fffffffc5c0,
n_params=n_params@entry=1) at ../../../../jhbuild/checkout/glib/gobject/gobject.c:1805
#31 0x00007ffff7286164 in g_object_new_valist (object_type=<optimized out>,
first_property_name=first_property_name@entry=0x7ffff7c6d778 "display", var_args=var_args@entry=0x7fffffffc708)
at ../../../../jhbuild/checkout/glib/gobject/gobject.c:2128
#32 0x00007ffff728648c in g_object_new (object_type=<optimized out>,
```
I don't know if this is happening for anyone else, but this is what I get when opening the inspector or starting the node editor with enabled vulkan and Nvidia graphics (binary driver). This is on X of course. Can we guard against such problems?https://gitlab.gnome.org/GNOME/gtk/-/issues/1293hard stop css linear-gradient broken in gtk4 with vulkan backend2020-09-11T22:03:32ZGabriel Rauterhard stop css linear-gradient broken in gtk4 with vulkan backend## Steps to reproduce
1. use a linear gradient with hard stop as background like linear-gradient(color1 50%, color2 50%)
2. run this with gl backend and have a hard stop between the colors at 50%
3. run this with vulkan backend and o...## Steps to reproduce
1. use a linear gradient with hard stop as background like linear-gradient(color1 50%, color2 50%)
2. run this with gl backend and have a hard stop between the colors at 50%
3. run this with vulkan backend and only get color1 as background color
## Expected outcome
To have the linear-gradient behave the same as it did in gtk3 and as it does in the gl backend.
## Version information
gtk4 master
## Additional information
current workaround is to move one of the stops by 0.00001%.
e.g. linear-gradient(color1 49.99999%, color2 50.00001%) or linear-gradient(color1 50%, color2 50.00001%)https://gitlab.gnome.org/GNOME/gtk/-/issues/3148GTK tries to create zero sized Vulkan surface on Wayland, trips RADV assertion2020-09-11T00:34:14ZVal Packettval@packett.coolGTK tries to create zero sized Vulkan surface on Wayland, trips RADV assertion(This is with GTK 3.99.1, running under the [Wayfire](https://github.com/WayfireWM/wayfire) compositor, .)
The code in
https://gitlab.gnome.org/GNOME/gtk/-/blob/aff788e58308193d2a49707ca1afef5d422c065b/gdk/gdkvulkancontext.c#L325-334
se...(This is with GTK 3.99.1, running under the [Wayfire](https://github.com/WayfireWM/wayfire) compositor, .)
The code in
https://gitlab.gnome.org/GNOME/gtk/-/blob/aff788e58308193d2a49707ca1afef5d422c065b/gdk/gdkvulkancontext.c#L325-334
sets up `currentExtent = (width = 0, height = 0)` in the surface (because the `GdkSurface` is zero sized), which seems to be disallowed — the RADV driver blows up.
```
Process 65687 launched: '/usr/local/bin/gtk4-demo' (x86_64)
../src/amd/vulkan/radv_image.c:1403 ASSERT: pCreateInfo->extent.width > 0
../src/amd/vulkan/radv_image.c:1404 ASSERT: pCreateInfo->extent.height > 0
Assertion failed: (image->planes[0].surface.surf_size), function radv_image_create_layout, file ../src/amd/vulkan/radv_image.c, line 1363.
Process 65687 stopped
* thread #1, name = 'gtk4-demo', stop reason = signal SIGABRT
frame #0: 0x000000080291856a libc.so.7`__sys_thr_kill + 10
libc.so.7`__sys_thr_kill:
-> 0x80291856a <+10>: jb 0x80291c8c4
0x802918570 <+16>: retq
0x802918571: int3
0x802918572: int3
(lldb) bt
* thread #1, name = 'gtk4-demo', stop reason = signal SIGABRT
* frame #0: 0x000000080291856a libc.so.7`__sys_thr_kill + 10
frame #1: 0x0000000802917f14 libc.so.7`__raise + 52
frame #2: 0x0000000802896279 libc.so.7`abort + 73
frame #3: 0x00000008029058f1 libc.so.7`__assert + 81
frame #4: 0x00000008094cd1fe libvulkan_radeon.so`radv_image_create_layout(device=0x0000000806e81000, create_info=radv_image_create_info @ 0x00007fffffffb460, image=0x000000080391d000) at radv_image.c:1363:2
frame #5: 0x00000008094ce00f libvulkan_radeon.so`radv_image_create(_device=0x0000000806e81000, create_info=0x00007fffffffb530, alloc=0x000000080396bfb8, pImage=0x000000080396c078) at radv_image.c:1463:29
frame #6: 0x00000008094cfbb0 libvulkan_radeon.so`radv_CreateImage(device=0x0000000806e81000, pCreateInfo=0x00007fffffffb8e0, pAllocator=0x000000080396bfb8, pImage=0x000000080396c078) at radv_image.c:1786:9
frame #7: 0x00000008095e9b27 libvulkan_radeon.so`wsi_create_native_image(chain=0x000000080396bf80, pCreateInfo=0x00007fffffffbb30, num_modifier_lists=0, num_modifiers=0x000000080396c060, modifiers=0x000000080396c068, image=0x000000080396c078) at wsi_common.c:541:13
frame #8: 0x00000008095f3446 libvulkan_radeon.so`wsi_wl_image_init(chain=0x000000080396bf80, image=0x000000080396c078, pCreateInfo=0x00007fffffffbb30, pAllocator=0x0000000806e81028) at wsi_common_wayland.c:927:13
frame #9: 0x00000008095f1f21 libvulkan_radeon.so`wsi_wl_surface_create_swapchain(icd_surface=0x0000000803932880, device=0x0000000806e81000, wsi_device=0x0000000806e5d028, pCreateInfo=0x00007fffffffbb30, pAllocator=0x0000000806e81028, swapchain_out=0x00007fffffffbac0) at wsi_common_wayland.c:1144:16
frame #10: 0x00000008095eb707 libvulkan_radeon.so`wsi_common_create_swapchain(wsi=0x0000000806e5d028, device=0x0000000806e81000, pCreateInfo=0x00007fffffffbb30, pAllocator=0x0000000806e81028, pSwapchain=0x00007fffffffbd48) at wsi_common.c:1051:22
frame #11: 0x000000080955f871 libvulkan_radeon.so`radv_CreateSwapchainKHR(_device=0x0000000806e81000, pCreateInfo=0x00007fffffffbb30, pAllocator=0x0000000000000000, pSwapchain=0x00007fffffffbd48) at radv_wsi.c:192:9
frame #12: 0x0000000802d8feff libvulkan.so.1`___lldb_unnamed_symbol315$$libvulkan.so.1 + 191
frame #13: 0x0000000801f42081 libgtk-4.so.0`gdk_vulkan_context_check_swapchain(context=0x0000000806d98410, error=0x00007fffffffc190) at gdkvulkancontext.c:336:9
frame #14: 0x0000000801f42758 libgtk-4.so.0`gdk_vulkan_context_real_init(initable=0x0000000806d98410, cancellable=0x0000000000000000, error=0x00007fffffffc190) at gdkvulkancontext.c:622:12
frame #15: 0x000000080226d1f7 libgio-2.0.so.0`g_initable_new_valist + 199
frame #16: 0x000000080226d124 libgio-2.0.so.0`g_initable_new + 132
frame #17: 0x0000000801f454e7 libgtk-4.so.0`gdk_surface_create_vulkan_context(surface=0x0000000806daa010, error=0x00007fffffffc190) at gdksurface.c:1226:10
frame #18: 0x000000080200695e libgtk-4.so.0`gsk_vulkan_renderer_realize(renderer=0x00000008039beb80, window=0x0000000806daa010, error=0x00007fffffffc190) at gskvulkanrenderer.c:122:18
frame #19: 0x0000000801fcaf81 libgtk-4.so.0`gsk_renderer_realize(renderer=0x00000008039beb80, surface=0x0000000806daa010, error=0x00007fffffffc190) at gskrenderer.c:293:8
frame #20: 0x0000000801fcbbc5 libgtk-4.so.0`gsk_renderer_new_for_surface(surface=0x0000000806daa010) at gskrenderer.c:630:11
frame #21: 0x0000000801dc7153 libgtk-4.so.0`gtk_window_realize(widget=0x00000008039f8350) at gtkwindow.c:4401:22
frame #22: 0x0000000801a44607 libgtk-4.so.0`gtk_application_window_real_realize(widget=0x00000008039f8350) at gtkapplicationwindow.c:504:3
frame #23: 0x000000080157b9bd libgobject-2.0.so.0`g_closure_invoke + 189
frame #24: 0x000000080159022d libgobject-2.0.so.0`___lldb_unnamed_symbol241$$libgobject-2.0.so.0 + 1053
frame #25: 0x00000008015913ca libgobject-2.0.so.0`g_signal_emit_valist + 2538
frame #26: 0x00000008015917ec libgobject-2.0.so.0`g_signal_emit + 124
frame #27: 0x0000000801d9f0cc libgtk-4.so.0`gtk_widget_realize(widget=0x00000008039f8350) at gtkwidget.c:3299:3
frame #28: 0x0000000801dc6a5e libgtk-4.so.0`gtk_window_show(widget=0x00000008039f8350) at gtkwindow.c:3782:3
frame #29: 0x000000080157bba6 libgobject-2.0.so.0`___lldb_unnamed_symbol61$$libgobject-2.0.so.0 + 198
frame #30: 0x0000000801590e5c libgobject-2.0.so.0`g_signal_emit_valist + 1148
frame #31: 0x00000008015917ec libgobject-2.0.so.0`g_signal_emit + 124
frame #32: 0x0000000801d9e84d libgtk-4.so.0`gtk_widget_show(widget=0x00000008039f8350) at gtkwidget.c:2584:7
frame #33: 0x00000000014dfacf gtk4-demo`command_line(app=0x00000008038780e0, cmdline=0x00000008038a1e20) at main.c:976:5
frame #34: 0x0000000802273ff8 libgio-2.0.so.0`___lldb_unnamed_symbol960$$libgio-2.0.so.0 + 104
frame #35: 0x000000080157b9bd libgobject-2.0.so.0`g_closure_invoke + 189
frame #36: 0x0000000801590442 libgobject-2.0.so.0`___lldb_unnamed_symbol241$$libgobject-2.0.so.0 + 1586
frame #37: 0x0000000801591417 libgobject-2.0.so.0`g_signal_emit_valist + 2615
frame #38: 0x00000008015917ec libgobject-2.0.so.0`g_signal_emit + 124
frame #39: 0x00000008022cc054 libgio-2.0.so.0`___lldb_unnamed_symbol2028$$libgio-2.0.so.0 + 116
frame #40: 0x00000008022cdd3b libgio-2.0.so.0`___lldb_unnamed_symbol2047$$libgio-2.0.so.0 + 1579
frame #41: 0x0000000801a42575 libgtk-4.so.0`gtk_application_local_command_line(application=0x00000008038780e0, arguments=0x00007fffffffd0b8, exit_status=0x00007fffffffd0c4) at gtkapplication.c:300:10
frame #42: 0x00000008022cbdf5 libgio-2.0.so.0`g_application_run + 357
frame #43: 0x00000000014defdb gtk4-demo`main(argc=1, argv=0x00007fffffffd260) at main.c:1047:3
frame #44: 0x00000000014a0f02 gtk4-demo`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
(lldb) fr sel 13
frame #13: 0x0000000801f42081 libgtk-4.so.0`gdk_vulkan_context_check_swapchain(context=0x0000000806d98410, error=0x00007fffffffc190) at gdkvulkancontext.c:336:9
333 capabilities.currentExtent.height = gdk_surface_get_height (surface) * gdk_surface_get_scale_factor (surface);
334 }
335
-> 336 res = GDK_VK_CHECK (vkCreateSwapchainKHR, device,
337 &(VkSwapchainCreateInfoKHR) {
338 .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
339 .pNext = NULL,
(lldb) fr v
(GdkVulkanContext *) context = 0x0000000806d98410
(GError **) error = 0x00007fffffffc190
(GdkVulkanContextPrivate *) priv = 0x0000000806d983b0
(GdkSurface *) surface = 0x0000000806daa010
(VkSurfaceCapabilitiesKHR) capabilities = {
minImageCount = 4
maxImageCount = 0
currentExtent = (width = 0, height = 0)
minImageExtent = (width = 1, height = 1)
maxImageExtent = (width = 16384, height = 16384)
maxImageArrayLayers = 1
supportedTransforms = 1
currentTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
supportedCompositeAlpha = 3
supportedUsageFlags = 31
}
(VkCompositeAlphaFlagBitsKHR) composite_alpha = VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
(VkSwapchainKHR) new_swapchain = 0x0000000801f42896
(VkResult) res = VK_SUCCESS
(VkDevice) device = 0x0000000806e81000
(guint) i = 0
(lldb) p *surface
(GdkSurface) $0 = {
parent_instance = {
g_type_instance = {
g_class = 0x0000000806d2b400
}
ref_count = 4
qdata = 0x0000000000000000
}
display = 0x0000000803900040
transient_for = 0x0000000000000000
parent = 0x0000000000000000
children = 0x0000000000000000
widget = 0x00000008039f8350
x = 0
y = 0
gl_paint_context = 0x0000000000000000
update_area = 0x0000000000000000
update_freeze_count = 0
pending_schedule_update = 0
active_update_area = 0x0000000000000000
old_state =
state = GDK_SURFACE_STATE_WITHDRAWN
resize_count = '\0'
alpha = '\xff'
fullscreen_mode = '\0'
modal_hint = 0
destroyed = 0
in_update = 0
frame_clock_events_paused = 0
autohide = 0
shortcuts_inhibited = 0
request_motion = 0
popup = (surface_anchor = <no summary available>, rect_anchor = <no summary available>)
update_and_descendants_freeze_count = 0
width = 0
height = 0
shadow_top = 0
shadow_left = 0
shadow_right = 0
shadow_bottom = 0
cursor = 0x0000000000000000
device_cursor = 0x0000000806618240
input_region = 0x0000000000000000
devices_inside = 0x0000000000000000
frame_clock = 0x0000000806da3140
draw_contexts = 0x000000080660ab80
paint_context = 0x0000000000000000
opaque_region = 0x0000000000000000
current_shortcuts_inhibited_seat = 0x0000000000000000
}
```
This workaround works:
```diff
--- gdk/gdkvulkancontext.c.orig 2020-09-10 12:49:43 UTC
+++ gdk/gdkvulkancontext.c
@@ -333,6 +333,11 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext
capabilities.currentExtent.height = gdk_surface_get_height (surface) * gdk_surface_get_scale_factor (surface);
}
+ if (capabilities.currentExtent.width == 0)
+ capabilities.currentExtent.width = 1;
+ if (capabilities.currentExtent.height == 0)
+ capabilities.currentExtent.height = 1;
+
res = GDK_VK_CHECK (vkCreateSwapchainKHR, device,
&(VkSwapchainCreateInfoKHR) {
.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
```
but the root cause is probably something to do with starting to render too early, before the window size is configured?https://gitlab.gnome.org/GNOME/gtk/-/issues/3147vulkan renderer fails to realize on intel2020-09-10T18:18:57ZMatthias Clasenvulkan renderer fails to realize on intelThis happens on Wayland, but not on X:
```
$ GSK_RENDERER=vulkan ./build/demos/widget-factory/gtk4-widget-factory
Gsk-Message: 08:32:19.680: Failed to realize renderer of type 'GskVulkanRenderer' for surface 'GdkWaylandToplevel': Could...This happens on Wayland, but not on X:
```
$ GSK_RENDERER=vulkan ./build/demos/widget-factory/gtk4-widget-factory
Gsk-Message: 08:32:19.680: Failed to realize renderer of type 'GskVulkanRenderer' for surface 'GdkWaylandToplevel': Could not create swapchain for this surface: A device memory allocation has failed.
```
The error is coming out of the vkCreateSwapchainKHR callhttps://gitlab.gnome.org/GNOME/gtk/-/issues/102Incorrect CSS border drawing2020-08-05T12:34:18ZTimm BäderIncorrect CSS border drawingThe Cairo renderer does not draw all css border test cases from `tests/testborderdrawing` correctly.
This is the reference image drawn using the GL renderer. The results of the first two are debatable and browsers don't agree either, bu...The Cairo renderer does not draw all css border test cases from `tests/testborderdrawing` correctly.
This is the reference image drawn using the GL renderer. The results of the first two are debatable and browsers don't agree either, but the second one is definitely broken with the cairo renderer, as are the last two.
Reference:
![2018-03-17-115134_597x391_scrot](/uploads/9340bba5f41219893034bf984de82716/2018-03-17-115134_597x391_scrot.png)
Cairo Renderer:
![2018-03-17-115144_596x401_scrot](/uploads/05eaf78ae8d002a0253569bebc458038/2018-03-17-115144_596x401_scrot.png)
Vulkan has at least the last two broken:
![2018-03-17-115758_585x386_scrot](/uploads/8f206f70eb7a73b9796afc51d875052f/2018-03-17-115758_585x386_scrot.png)https://gitlab.gnome.org/GNOME/gtk/-/issues/1311Crash on using GtkComboBox with GSK Renderer Vulkan and GDK Backend wayland2020-02-24T00:21:47ZGabriel RauterCrash on using GtkComboBox with GSK Renderer Vulkan and GDK Backend wayland## Steps to reproduce
1. Start `gtk4-widget-factory` with `GSK_RENDERER=vulkan` and `GDK_BACKEND=wayland`
2. Click on any of the GtkComboBox with the text 'left', 'middle' or 'right'
3. Click somewhere else or on an entry on the list...## Steps to reproduce
1. Start `gtk4-widget-factory` with `GSK_RENDERER=vulkan` and `GDK_BACKEND=wayland`
2. Click on any of the GtkComboBox with the text 'left', 'middle' or 'right'
3. Click somewhere else or on an entry on the list that appeared to make the list disappear.
4. Click a second time on the GtkComboBox you chose in Step 2
5. Have the application crash
* The same happens on any Combobox of the gtk4-demo Combo Boxes demo
## Errors
`Gdk-Message: 11:02:58.515: Error 22 (Invalid argument) dispatching to Wayland display.`
## Additional notes
The crash does not happen with:
* `GSK_RENDERER=gl` and `GDK_BACKEND=wayland`
* `GSK_RENDERER=vulkan` and `GDK_BACKEND=x11` (XWayland)
* `GSK_RENDERER=gl` and `GDK_BACKEND=x11` (XWayland)
## Version information
arch linux
gtk master 16deffb48d9cdd7dfc55cfa0f483dd7e35ba0287
mutter 3.28.3+8+gd0d807801
vulkan driver: mesa radv 18.1.7
llvm 6.01