<p>we have a Windows/DirectX11 2D Renderer that paints textured triangles to the screen from back to front. There is no face-culling or depth test activated.</p>
<p>Now on AMD GPUs it happens randomly that an already painted triangle disappears. That means it looks like something cleares the specific triangle out of the backbuffer after it has already been painted resulting in flickering graphics. It happens regardless how the triangle is painted (single Triangle, TriangleList, TriangleStrip).</p>
<p>When debugging with RenderDoc we found that it is complete random, which drawcall triggers this clearing. You can jump back and forth between any two drawcalls that come after the triangle has been painted and there is a chance that it will clear the triangle.
The drawcalls that trigger the discarding are drawing on completely other areas on the screen/backbuffer. So they are not even overlapping the area that the affected triangle occupies.</p>
<p>We have already checked for any <code>NaN</code>s or other uninitialized data being sent to the GPU, but couldn't find anything.</p>
<p>These artefacts do not appear on NVidia or Intel GPUs.
Thanks for any ideas what we could look for to debug and fix this issue further.</p>

CC BY-SA 4.0
2023-08-30T07:18:46.617Z
Does the deletion appear even if there is no other triangle behind the deleted triangle?
You said that you do not use the depth test. Maybe the render order of the triangles is different on AMD GPUs. So it could be that the front triangle is overwritten by the triangle behind it. I would try to create a scenario where some parts of the screen are covered by only one triangle and check if this triangle is discarded. You can also activate additive blending to see if the flickering is still present.
Thomas
CC BY-SA 4.0
2023-08-30T07:22:50.683Z
when activating additive blending, with a low alpha channel value for each triangle, the flickering will stop if no triangles are deleted. With alpha blending you can easily check if the triangle was really deleted or just overwritten by others
Thomas
CC BY-SA 4.0
2023-08-30T08:10:54.913Z
Thanks @Thomas, the render order is always the same (back to front) at least from our application side. From the visual artefact it doesnt look like another triangle is overriding it, since the shape of the missing piece is exactly the triangle that is discarded. I'll play around with the additive blending and come back to you.
user20154
<gpu><polygon><directx11><artifacts>
AMD GPU specific triangles disappearing by subsequent draw calls in same frame
user20154
# AMD GPU specific triangles disappearing by subsequent draw calls in same frame

(Asked by: username_0 on 2023-08-30)

we have a Windows/DirectX11 2D Renderer that paints textured triangles to the screen from back to front. There is no face-culling or depth test activated.

Now on AMD GPUs it happens randomly that an already painted triangle disappears. That means it looks like something cleares the specific triangle out of the backbuffer after it has already been painted resulting in flickering graphics. It happens regardless how the triangle is painted (single Triangle, TriangleList, TriangleStrip).

When debugging with RenderDoc we found that it is complete random, which drawcall triggers this clearing. You can jump back and forth between any two drawcalls that come after the triangle has been painted and there is a chance that it will clear the triangle.
The drawcalls that trigger the discarding are drawing on completely other areas on the screen/backbuffer. So they are not even overlapping the area that the affected triangle occupies.

We have already checked for any `NaN`s or other uninitialized data being sent to the GPU, but couldn't find anything.

These artefacts do not appear on NVidia or Intel GPUs.
Thanks for any ideas what we could look for to debug and fix this issue further.

**Tags:** gpu, polygon, directx11, artifacts

> **Comments:**
> **username_1**: Does the deletion appear even if there is no other triangle behind the deleted triangle? You said that you do not use the depth test. Maybe the render order of the triangles is different on AMD GPUs. So it could be that the front triangle is overwritten by the triangle behind it. I would try to create a scenario where some parts of the screen are covered by only one triangle and check if this triangle is discarded. You can also activate additive blending to see if the flickering is still present.  
> **username_1**: when activating additive blending, with a low alpha channel value for each triangle, the flickering will stop if no triangles are deleted. With alpha blending you can easily check if the triangle was really deleted or just overwritten by others  
> **username_0**: Thanks @username_1, the render order is always the same (back to front) at least from our application side. From the visual artefact it doesnt look like another triangle is overriding it, since the shape of the missing piece is exactly the triangle that is discarded. I'll play around with the additive blending and come back to you.  

---

## 0 answers

