cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

joren_1147
Adept I

[RX6700 XT OPenGL] Compute Shader compile error cannot use layout qualifiers on a function parameter

 

Hi, Dear all, 

When I recently used opengl to write a compute shader(use version 430, not 450 or 460),  I encountered a compilation error as follows:

ERROR: 0:50: '' : cannot use layout qualifiers on a function parameter
ERROR: 0:50: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

Part of the shader code is as follows:

#version 430

#extension GL_ARB_shader_image_load_store : require

layout(binding = 0, r32ui) uniform volatile coherent uimage3D voxelAlbedo;
layout(binding = 1, r32ui) uniform volatile coherent uimage3D voxelNormal;
layout(binding = 2, r32ui) uniform volatile coherent uimage3D voxelEmission;

void imageAtomicRGBA8Avg(layout(r32ui) volatile coherent uimage3D grid, ivec3 coords, vec4 value)
{

//do something.

}

 

void main()
{

imageAtomicRGBA8Avg(voxelNormal, position, normal);
imageAtomicRGBA8Avg(voxelAlbedo, position, albedo);
imageAtomicRGBA8Avg(voxelEmission, position, emissive);

}

This means that the function can not use layout(r32ui). But in Nvidia card, It can work fine!

How can I deal with this problem? If you have any comments or suggestions, please let me know.

This is the demo:

https://github.com/jose-villegas/VCTRenderer

If you use vs2022, there is a small issue in the code, you need to add a header file in scene_cameras.cpp like this #include <iterator>.

Thank you!

0 Likes
2 Solutions

Thanks for the information. 

Could you please try the latest Adrenalin 23.7.2 to check if the issue is still reproducible?

Thanks.

View solution in original post

0 Likes

Yes, the issue has been fixed! Can you tell me what happened inside the driver? I was very curious....

View solution in original post

0 Likes
6 Replies
dipak
Big Boss

Hi @joren_1147 ,

Thanks for reporting the issue and providing the demo. I will forward it to the OpenGL team.

Thanks.

0 Likes
dipak
Big Boss

Could you please provide the setup information like OS, driver version etc.?

Thanks.

0 Likes

OS: Windows11 pro(64bits) version :  22H2 -----22621.1992

Driver version: 22.40.37.17-230424a-391195c-AMD-Software-PRO-Edition

AMD Windows Driver version : 31.0.14037.17019

 

0 Likes

Thanks for the information. 

Could you please try the latest Adrenalin 23.7.2 to check if the issue is still reproducible?

Thanks.

0 Likes

Yes, the issue has been fixed! Can you tell me what happened inside the driver? I was very curious....

0 Likes

Thanks for confirming the fix. 

>> Can you tell me what happened inside the driver? I was very curious....

We didn't create any ticket for this issue. You were using an older driver, so I asked you to try the latest driver.  It seems the issue was already fixed in that driver. 

Thanks.

0 Likes