Results 1 to 3 of 3

Thread: Vulkan Compute - shader local size.

  1. #1
    Newbie Newbie
    Join Date
    Nov 2018

    Vulkan Compute - shader local size.


    I have a bug related to the vulkan compute. In the compute shader, if set local size something like:
    Code :
    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:
    Code :
    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 (Linux Debian sid 4.18.10-2).
    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).

    Nvidia Geforce 1070ti
    Driver Version: 410.78

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

    Any ideas?

    Best Regards.

  2. #2

  3. #3
    Administrator Regular Contributor khronos's Avatar
    Join Date
    Feb 2000
    For completeness, adding the answer here as well:

    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 32*32*2=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.

Similar Threads

  1. Replies: 3
    Last Post: 05-03-2018, 03:52 PM
  2. Replies: 4
    Last Post: 11-01-2017, 11:00 AM
  3. Replies: 3
    Last Post: 09-17-2017, 10:59 AM
  4. OpenCL vs. Vulkan Compute
    By tornado in forum Vulkan
    Replies: 6
    Last Post: 03-18-2017, 08:27 AM
  5. OpenCL Ndrange Global Size/Local Size
    By BiS in forum OpenCL
    Replies: 4
    Last Post: 01-04-2013, 07:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean