Vulkan Compute - shader local size bug.


I have a bug related to the vulkan compute. In the compute shader, if set local size something like:

layout (local_size_x = 32, local_size_y = 32, local_size_z = 1) in;

The compute app works ok. But if set local_size_z greater than 1:

layout (local_size_x = 32, local_size_y = 32, local_size_z = 2) in;

The compute app freezes after the command buffer has been dispached.

Any ideas?

This is simple compute app, that copy values from one buffer to another.

Nvidia Geforce 1070ti
Driver Version: 410.78
Debian sid 4.18.10-2

Best Regards.

1 Like

The situation on Windows is slightly different. If local_size_z greater than 1, the compute app does not freezes, but computational result is incorrect(all output buffer values are zero).

The Validation layer(VK_LAYER_LUNARG_standard_validation) was enabled on both OS (Linux and Windows).


the error is on your end. The 1070 TI has, according to, a physical device limit of 1536 for maxComputeWorkGroupInvocations. Your nonworking compute shader has a working group size of 32322=2048.
The required minimum for this limit is 128, so if you want to use a larger size, you need to check your device limit. If you want to adapt to your hardware, use specialization constants for the local size.


1 Like

Thank you for your reply. You are right, the problem was occurred because the product of the X, Y, and Z sizes not complied with limits.

1 Like

у меня не работает vulcan не могу понять после обновления перестало работать пытался поставить старые драйвера а она всё равно не работает видео карта gtx550ti обновления последние стоят