Results 1 to 3 of 3

Thread: Vulkan Compute - shader local size.

  1. #1
    Newbie
    Join Date
    Nov 2018
    Posts
    2

    Vulkan Compute - shader local size.

    Hello,

    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.
    https://bitbucket.org/HiT__/compute-shader

    Any ideas?

    Best Regards.

  2. #2

  3. #3
    Administrator khronos's Avatar
    Join Date
    Jun 2002
    Location
    Montreal
    Posts
    107
    For completeness, adding the answer here as well:

    --------------------
    the error is on your end. The 1070 TI has, according to vulkan.gpuinfo.org, 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.
    --------------------

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