cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

stailgot
Adept II

Blitting of stencil corrupts depth buffer on RX 7600

Hello

I noticed an issue on AMD RX 7600 with 23.9.1 driver.

Let we have two user-created framebuffers. FBO #1 - framebuffer with one color attachment and one depth-stencil attachment. And FBO #2 - almost as FBO #1 except texture attachments are multisampled. When I do glBlitFramebuffer(FBO #1, FBO #2, GL_STENCIL_BUFFER_BIT), it may corrupt a depth buffer under certain settings.  And result image may become so:

stailgot_0-1695120131173.png

 

 

Profiling say to me that it's due to depth buffer corruption. 

Also I noticed: it can be fixed if I call glBlitFramebuffer(FBO #1, FBO #2, GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT). Also it's fixed if framebuffers are not multisampled (both). So I guess it's due to multisampling resolution, but I'm not sure.

I tried to write a reproducer, but i'm not sure it's fully repeat my problem. On Nvidia it's works and draw this, and RX 7600 it draws nothing(just purple bkg). I hope it helps.

stailgot_2-1695038002956.png

Also my PC configuration: 

stailgot_3-1695038076911.png

0 Likes
8 Replies
dipak
Big Boss

Hi @stailgot ,

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

Thanks.

0 Likes
dipak
Big Boss

Hi @stailgot ,

Could you please try Adrenalin 23.9.3 and share your observation?

Thanks.

0 Likes

Hello, @dipak ,

I've checked it on Adrenalin 23.9.3 and it's repeated. And reproducer's behavior is same.

0 Likes

Thanks for sharing your observation. I have reported the issue to the OpenGL team and filed an internal ticket to track it.

Thanks.

0 Likes

Hi, @dipak 

Are there any news about this issue?

0 Likes

I will check with the OpenGL team and let you know if I get any update on this.

Thanks.

Hi @stailgot ,

Below is the OpenGL team's feedback on this issue:

"We could not reproduce the issue with the program on the latest internal driver.
However, it seems there is a potential issue for stencil only upsampling, which could be the root-cause of the issue reported by the end-user. As a result, it makes sense that the corruption would be gone when doing upsampling for depth stencil (glBlitFramebuffer(FBO #1, FBO #2, GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)). 

We will look into this upsampling issue. "

Also, the OpenGL team has mentioned that it would be helpful if you can provide a test-case for stencil only upsampling which is similar to your real case problem. Then they can use it to verify their fix for this issue.

Thanks.

0 Likes

Hi, @dipak 

I guess you're right about reason, because I tried to make glBlitFramebuffer(FBO #1, FBO #2, GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) and it's fix issue.

I guess this reproducer is just linear copy of gl-calls from application. The difference only in vertex data. I will check my reproducer and maybe update.

Thank you