I have implemented abstract rendering api on top of opengl with extensions such as bindless textures however I see weird behaviour while rendering. If i will resize texture (Bindless textures cannot be resized so I am deleting handle & texture and then recreating and attaching it to a framebuffer again) only after some clear or draw command to that FBO (Before new frame) then i am getting weird artifacts on screen. There’s more to it. If i recreate FBO itself and attach resized texture to it, then it works fine. However if I add third render pass in the middle (post process in my case) and use resulted texture in shader to draw on screen then artifacts appear again. (glFlush and glFinish does not fix the problem)
So rendering pass looks like this:
Render scene in first FBO
Use result texture and render into second FBO
Use result texture and render into default FBO
I am setting texture as resident when requesting handle, and it stays like that forever until deleted or resized. These artifacts do not appear when im not using bindless textures. Also if i will download pixels with glReadPixels or glGetTexSubImage2D or such functions even only one pixel after resizing then everything works Fine. I am using AMD GPU. My thoughts are that there is a bug in implementation. Cannot find any good debugger except RenderDoc, however, it does not support bindless textures.
Here is the texture with artifacts I am getting on screen:
This is just an UV coords rendered on screen.
OS: Win 10
GPU: RX 580