cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

stailgot
Adept II

Doesn't work glPixelTransferf() and error in shader on OpenGL with AMD driver 22.7.1 and above

Hello,

I've got some problems on AMD driver 22.7.1 and above:

1) I try to load texture on GPU with glTexImage2D. glPixelTransferf() should change some channels, but in that driver it doesn't.

 

 

// enables compatibility profile for OpenGL
...
if (GL_ARB_compatibility) // it's true
    glPixelTransferf(GL_RED_SCALE, 0.0f); // no effect on AMD 22.7.1 and above
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, image_data);

 

 

 

2) Some shaders stoped to compile. The linking stage returns error: "Fail to build reflection info". I googled it and found nothing. I did some experiments to find out a reason, but I couldn't. I found some ways to avoid the error: f.e. if i replace interface blocks with in/out variable with layout linking, the shaders will compile fine. Or I can comment some lines and it will compile fine too. The shader's code is in project below (see incorrect_vert.vert and incorrect_frag.frag)

The same code works fine on NVidia GPUs and AMD 22.6.1. I wrote a little project to show both problems. Please check it.

My configuration:

System: Windows 10

stailgot_0-1680000697553.png

 

 

1 Solution

Hi @stailgot ,

Could you please check the OpenGL team's reply below and clarify the queries?

"We looked at the shader "incorrect_vert.vert" and found that the number of locations in this shader is 33, but we only support 32 locations. So, may we know the original intention of writing this shader? Why did the user write 33 locations?"

Thanks.

View solution in original post

18 Replies
dipak
Big Boss

Hi @stailgot ,

Thanks for reporting the issue and providing the reproducible test-case. I have forwarded the issue to the OpenGL team.

Thanks.

0 Likes
dipak
Big Boss

We have filed two tickets to track the above issues. I will notify you once I get any update on this.

Thanks.

0 Likes

Thank you. Keep me informed.

0 Likes
stailgot
Adept II

Hello. Is there any news?

0 Likes

As I can see from the internal bug tracking system, both the tickets have been assigned to the relevant dev teams and they are looking into the issues. Once I get any update on this, I will let you know.

Thanks.

0 Likes
stailgot
Adept II

Hello. Are there any changes?

0 Likes

Hi @stailgot ,

Here is the update I have from the related tickets:

1) glPixelTransferf() related issue has been fixed internally. The fix is expected to be promoted to the mainline driver soon.

2) The shader compilation issue is still under investigation.

Thanks.

0 Likes

Good news! Thank you.

Now we wait only shader compilation problem resolution.

Keep up to date

0 Likes

Hi @stailgot ,

Could you please check the OpenGL team's reply below and clarify the queries?

"We looked at the shader "incorrect_vert.vert" and found that the number of locations in this shader is 33, but we only support 32 locations. So, may we know the original intention of writing this shader? Why did the user write 33 locations?"

Thanks.

Hi, @dipak ,

These locations it's just data to draw bodies in our CAD system. It's a bit difficult surface's painting)

The shader is written long before I get this problem and early (22.6.1 and early) it was work fine (for many users and many GPU's). Honestly, I didn't know about the limitation in 32 locations

Thanks for your reply. I will share it with the OpenGL team.

Thanks.

 

I couldn't find information about limitation of locations. Which constant is responsible for this? GL_MAX_VARYING_COMPONENTS

I have forwarded your query to the OpenGL team.

Thanks.

0 Likes

>> I couldn't find information about limitation of locations. Which constant is responsible for this?

As the OpenGL team has informed, it's an implementation-defined limit and end-users cannot access it. 

They also found that the shader (incorrect_vert.vert) doesn't fully exceed this restriction/limit. They are investigating the issue in detail to identify the root-cause of it.

Thanks.

stailgot
Adept II

Hello again. I've got some news)

You were right about shaders. I deleted "material" field in shader and it's compiled. Material was really heavy structure and it's better to pass it throught SSBO, not interface block or vertex attribute. So, I guess it's done, but it was only a part.

I found another problem in 22.7.1 driver. If I create new vertex attribute in VAO and bound buffer is empty - nothing will be rendered at all. In older versions of driver or NVidea GPUs, it works and doesn't affect on rendering.

I've created a reproducer, you can see and analyse. I attach it: https://drive.google.com/file/d/1AkFlEVTHUk6KWZNVQcIWr796FiPg-RFP/view?usp=drive_link

Please check it and fix.

0 Likes

Hi @stailgot ,


You were right about shaders. I deleted "material" field in shader and it's compiled...


Thanks for sharing your observation. I will inform the OpenGL team.

 

I found another problem in 22.7.1 driver. If I create new vertex attribute in VAO and bound buffer is empty - nothing will be rendered at all...


Could you please create a new thread for the above issue? It would be helpful for us to track it. Also, please share the setup information like GPU, OS, driver version etc.

Note, the latest Adrenalin driver is available here: Adrenalin 23-7-2 . Please check the issue with the latest driver if you have not tried it.

Thanks.

I checked it and wrote new topic - https://community.amd.com/t5/opengl-vulkan/draw-calls-don-t-work-on-driver-22-7-1-and-above/m-p/6260....

This topic is solved, I guess, so I close it. Thanks for your help.

dipak
Big Boss

Hi @stailgot ,

Regarding the 1st issue i.e. glPixelTransferf()  related issue, could you please try the latest driver (Adrenalin 23.9.2) and let us know if the issue has been resolved?

Thanks.

0 Likes