Forums - troubles using the glsl barrier() function in a vulkan compute shader

1 post / 0 new
troubles using the glsl barrier() function in a vulkan compute shader
Join Date: 7 Aug 19
Posts: 1
Posted: Tue, 2019-10-22 07:41


I am developping a rendering application using vulkan on a Adreno 630 GPU (the platform is SDM845)

I tried using a compute shader to pre-process some of my attachments, but I have trouble using the barrier() function to synchronize my threads.

Anywhere I add the "barrier();" instruction, It makes my application crash.

I compile the glsl code using glslangvalidator to generate spir-v code for my compute shader.

the version of glslangvalidator  I use is:

glslangvalidator -v
Glslang Version: 7.11.3113
ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 11.3113
GLSL Version: 4.60 glslang Khronos. 11.3113
SPIR-V Version 0x00010300, Revision 6
GLSL.std.450 Version 100, Revision 1
Khronos Tool ID 8
SPIR-V Generator Version 7
GL_KHR_vulkan_glsl version 100
ARB_GL_gl_spirv version 100
My shader code starts with:
#version 460
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable

Even if I start the main function with the barrier(); instruction, it makes my application crash:

void main()
    // Pixel coordinates

    uint rgbColIndex, rgbRowIndex;


*** my code ***



Are there some prerequisits before being able to use that barrier() function?





  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.