cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

stailgot
Adept II

Some bugs in OpenGL with AMD driver 23.7.2

Hello. I found some problems in OpenGL with AMD Driver 23.7.2.

1) My shader uses extension GL_ARB_bindless_texture and I have some code which crash program.

 

 

void main()
{
    ...
    uvec2 handle = ...;
    if (handle != uvec(0))
        fragColor = texture2D(sampler2D(handle), uv); // crash because calls sampler2D(uvec2(0))
    else ...
    ...
}

 

But I guess the truly reason of crash is that shader calls sampler2D(uvec2(0)) because of shader executes if-body anyway.

2) There is some lgacy opengl calls in our project. And one is "glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE)". I noticed that it does nothing (I suppose it should generate mipmaps after glTexImage... ), though in early driver versions (22.6.1) - it works fine. I replaced this legacy call with glGenerateMipmap and it works fine.

3) I tried to upload texture with color palette via glTexImage2D(GL_TEXTURE_2D, 0, GL_R3_G3_B2, w, h, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, texture_data) and program crashed. I figured out that it's due to GL_COLOR_INDEX.

All problems starts from 22.7.1 driver version. It doesn't repeat at 22.6.1. Also it works on Nvidia.

I write some reproducer, you can take it and execute.

My PC configuration:

stailgot_0-1694085536551.png

 

0 Likes
26 Replies
dipak
Big Boss

Hi @stailgot ,

Thanks for reporting the above issues and providing the reproducible example. I will forward the issues to the OpenGL team.

Note, the latest Adrenalin driver is available here: Adrenalin 23.9.1  . Could you please check the above issues with this driver and share your observation?

Thanks.

0 Likes

Hi, @dipak.

I checked it on 23.9.1. 1 and 2 are repeated as describted. The third problem - no crash, but result image a bit strange (like pixels are shifted). I should see it in detail, tomorrow.

0 Likes

Hi @stailgot ,

Thanks for sharing your observation.

>> 1) My shader uses extension GL_ARB_bindless_texture and I have some code which crash program.

Regarding the above issue, is it related to the issue reported here: https://community.amd.com/t5/opengl-vulkan/null-pointer-for-glmemorybarrierbyregion-amp-crashes-samp...?

If it's a different issue, then we will create a new ticket to track this one.

Thanks.

0 Likes

Hi @dipak ,

I guess it's different. It's not because of attaching multiple same-type shaders to program.

0 Likes

Thanks for the confirmation. I have filed an internal ticket for this issue.

Thanks.

Hi @stailgot , 

Regarding the 1st issue, the OpenGL team has informed that they tried to reproduce the issue with the following shader, and it compiled successfully without any issues.

 Could you please check the issue with the latest driver (Adrenalin 23.9.2) and share your observation?

 

#version 450 compatibility
#extension  GL_ARB_bindless_texture: enable
layout(location = 0) uniform  uvec2 bindlessHandle;
void main()
{
    if (bindlessHandle != uvec2(0))
        gl_FragColor = texture(sampler2D(bindlessHandle), vec2(0.0));
    else
        gl_FragColor = texture(sampler2D(uvec2(0)), vec2(0.0));
}

Thanks.

0 Likes

Hello, @dipak ,

I've checked it on Adrenalin 23.9.3 and it's really solved.

Thank you

0 Likes

Thanks for the confirmation.

0 Likes

Just to let you know, I have filed an internal bug ticket to track the 2nd issue.

Thanks.

Update:

The 2nd issue has been fixed internally.

Thanks.

 

0 Likes

Hi @dipak ,

I've checked third issue on 23.9.1. It's repeated, but it's not crash. Just image uploaded incorrectly (like it has skew transform). I wrote a reproducer, you can take and check yourself.

Also I notified that it's crashed on 22.5.1 driver version.

0 Likes

Thanks for sharing the above observation and providing the reproducible example. I will report this issue to the OpenGL team.

Thanks.

Update:

I have filed an internal ticket to track the 3rd issue.

Thanks.

Hi @stailgot ,

Here is the feedback from the OpenGL team regarding the 3rd issue:

"There seems to be a bug in the driver so that only image with width aligned to multiple of 4 is displayed correctly. We are investigating the root-cause of this issue. Meanwhile, as a workaround, the end-user can use aligned image file to upload texture with color palette."

Thanks.

Update:

The OpenGL team has implemented a fix for the 3rd issue. Thanks.

Is it inside adrenalin 23.9.3? Or I could check it later?

0 Likes

The fix is not included in 23.9.3. 

Thanks.

Hello. I've updated my adrenalin driver to 23.10.1, but the 3rd issue is still repeated. Reproduccer is same.

Check it please.

0 Likes

Hi @stailgot ,

As I have been informed, Adrenalin 23.10.1 doesn't have the fix for the 3rd issue. The fix is likely to be released in December (note, this is just a tentative timeline and may change as decided by the release team).

Regarding the 2nd issue, it seems the fix is already available in the latest driver (since Adrenalin 23.9.3). Could you please try the latest Adrenalin 23.10.1 and let us know if the issue has been fixed?

Thanks.

0 Likes

Hi.

Yes, 2nd issue has been fixed in 23.10.1

Thank you

Thanks for the confirmation.

0 Likes
stailgot
Adept II

Hi, @dipak 

We noticed that 3rd issue is repeated on Radeon Pro WX 5100 Graphics  with 23.Q3.1 driver. Can you check it please?

Thank you

0 Likes

Hi @stailgot ,

As I mentioned here, the fix for the 3rd issue is not available in the latest drivers.

As per the related ticket, the fix is likely to be released in December (note, this is just a tentative timeline and may change as decided by the release team).

Thanks.

Hi @stailgot ,

Could you please try the latest Adrenalin 23.12.1 and let us know if the 3rd issue has been fixed?

Thanks.

0 Likes

Hi, @dipak 

I've checked 3rd issue on Adrenalin 23.12.1 and it repeated.

0 Likes

Thanks for sharing your observation. I have informed the OpenGL team.

Thanks.

0 Likes