Transparency in Solid View Causes Glitch Artifacts #83022

Closed
opened 2020-11-25 21:57:49 +01:00 by Zachary Litvinenko · 134 comments

System Information
Operating system: Windows 10

Graphics card Radeon RX 470
Radeon RX 460
Radeon (TM) RX 480 Graphics ATI Technologies
Radeon RX 560 Series ATI Technologies
AMD Radeon RX 570
AMD Radeon RX 580
AMD Radeon 370 R7
AMD Radeon(TM) 535 ATI Technologies
AMD 15D8:C9 ATI Technologies
AMD Radeon(TM) Vega 6 Graphics ATI Technologies
AMD Radeon Vega 8

Blender Version
Broken: 2.91.0
Worked: 2.90.0
Short description of error
Looks very scary once you get it. All objects turn black and the transparent object turns white and all that is covered with randomly colored artifacts. Once you pan around the viewport, you can see the black stuff leaves a trail behind it. See the attached image
image.png
Exact steps for others to reproduce the error
Open a new scene with the default cube
On the material tab, scroll down to Viewport Display and in Color make alpha something different than 1.
Click on the plus icon that adds a new material slot.
Voila.

**System Information** Operating system: Windows 10 | Graphics card | Radeon RX 470 | | -- | -- | || Radeon RX 460 | || Radeon (TM) RX 480 Graphics ATI Technologies | || Radeon RX 560 Series ATI Technologies | || AMD Radeon RX 570 | || AMD Radeon RX 580 | || AMD Radeon 370 R7 | || AMD Radeon(TM) 535 ATI Technologies | || AMD 15D8:C9 ATI Technologies | || AMD Radeon(TM) Vega 6 Graphics ATI Technologies | || AMD Radeon Vega 8 | **Blender Version** Broken: 2.91.0 Worked: 2.90.0 **Short description of error** Looks very scary once you get it. All objects turn black and the transparent object turns white and all that is covered with randomly colored artifacts. Once you pan around the viewport, you can see the black stuff leaves a trail behind it. See the attached image ![image.png](https://archive.blender.org/developer/F9374968/image.png) **Exact steps for others to reproduce the error** Open a new scene with the default cube On the material tab, scroll down to Viewport Display and in Color make alpha something different than 1. Click on the plus icon that adds a new material slot. Voila.

Added subscriber: @ZackMercury-2

Added subscriber: @ZackMercury-2

#98186 was marked as duplicate of this issue

#98186 was marked as duplicate of this issue

#98083 was marked as duplicate of this issue

#98083 was marked as duplicate of this issue

#94444 was marked as duplicate of this issue

#94444 was marked as duplicate of this issue

#94229 was marked as duplicate of this issue

#94229 was marked as duplicate of this issue

#93070 was marked as duplicate of this issue

#93070 was marked as duplicate of this issue

#92895 was marked as duplicate of this issue

#92895 was marked as duplicate of this issue

#92231 was marked as duplicate of this issue

#92231 was marked as duplicate of this issue

#92251 was marked as duplicate of this issue

#92251 was marked as duplicate of this issue

#89318 was marked as duplicate of this issue

#89318 was marked as duplicate of this issue

#90934 was marked as duplicate of this issue

#90934 was marked as duplicate of this issue

#90473 was marked as duplicate of this issue

#90473 was marked as duplicate of this issue

#90122 was marked as duplicate of this issue

#90122 was marked as duplicate of this issue

#87690 was marked as duplicate of this issue

#87690 was marked as duplicate of this issue

#84938 was marked as duplicate of this issue

#84938 was marked as duplicate of this issue

#87126 was marked as duplicate of this issue

#87126 was marked as duplicate of this issue

#83530 was marked as duplicate of this issue

#83530 was marked as duplicate of this issue

#82240 was marked as duplicate of this issue

#82240 was marked as duplicate of this issue

#83298 was marked as duplicate of this issue

#83298 was marked as duplicate of this issue

#83179 was marked as duplicate of this issue

#83179 was marked as duplicate of this issue

#83369 was marked as duplicate of this issue

#83369 was marked as duplicate of this issue

#83383 was marked as duplicate of this issue

#83383 was marked as duplicate of this issue

#83039 was marked as duplicate of this issue

#83039 was marked as duplicate of this issue
Member

Added subscriber: @Alaska

Added subscriber: @Alaska
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

There has been a bunch of graphical glitches on AMD GPUs with the latest GPU driver release. Are you able to try downgrading your driver to an older version to see if it helps?

If that doesn't work, it would be helpful if we had more information about your computer. This can be automatically generated by selecting from the top of Blender Help -> Save System Info and uploading the file it produces to this site.

There has been a bunch of graphical glitches on AMD GPUs with the latest GPU driver release. Are you able to try downgrading your driver to an older version to see if it helps? If that doesn't work, it would be helpful if we had more information about your computer. This can be automatically generated by selecting from the top of Blender `Help -> Save System Info` and uploading the file it produces to this site.

Added subscriber: @rjg

Added subscriber: @rjg

For reference the problematic driver @Alaska is referring to is 20.11.2, 27.20.14501.18003 (see #82856). Try to install a current driver, but avoid that specific version.

For reference the problematic driver @Alaska is referring to is 20.11.2, 27.20.14501.18003 (see #82856). Try to install a current driver, but avoid that specific version.

image.png
I have no clue what you're talking about, I haven't updated my driver since I installed the OS which was half a year ago.
The issue is occuring only since 2.91.0 and in experimental builds. When I use older builds it works fine.

![image.png](https://archive.blender.org/developer/F9380362/image.png) I have no clue what you're talking about, I haven't updated my driver since I installed the OS which was half a year ago. The issue is occuring only since 2.91.0 and in experimental builds. When I use older builds it works fine.
[system-info.txt](https://archive.blender.org/developer/F9380398/system-info.txt)

Added subscriber: @jochem_m

Added subscriber: @jochem_m

Can confirm this issue. I have an RX 460.

Issue is present in 2.91, but not in 2.90.1.

Once the issue occurred, I tried updating video drivers. This caused a separate issue (as described in #83053) which has been fixed by downgrading back to 20.9.1 amd drivers.

Blender 2.90.1 did not exhibit the issue described in this ticket on the latest AMD drivers.

An additional way to trigger this issue is by having two objects, one with viewport display color alpha set to 1, and another with a different material with alpha set to <1. I duplicated the default cube, created a single user copy of its material, and changed the viewport display color alpha slider.

system-info.txt attached{F9381438}

Can confirm this issue. I have an RX 460. Issue is present in 2.91, but not in 2.90.1. Once the issue occurred, I tried updating video drivers. This caused a separate issue (as described in #83053) which has been fixed by downgrading back to 20.9.1 amd drivers. Blender 2.90.1 did not exhibit the issue described in this ticket on the latest AMD drivers. An additional way to trigger this issue is by having two objects, one with viewport display color alpha set to 1, and another with a different material with alpha set to <1. I duplicated the default cube, created a single user copy of its material, and changed the viewport display color alpha slider. system-info.txt attached{[F9381438](https://archive.blender.org/developer/F9381438/system-info.txt)}

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Added subscriber: @oxben

Added subscriber: @oxben

I managed to reproduce it also on my Radeon Vega 8 thanks to the steps given by @jochem_m above.

Operating system: Windows 10
Graphics card: Radeon Vega 8 (drivers 20.9.1)

My ticket #83039 is probably a duplicate of this one.

I managed to reproduce it also on my Radeon Vega 8 thanks to the steps given by @jochem_m above. Operating system: Windows 10 Graphics card: Radeon Vega 8 (drivers 20.9.1) My ticket #83039 is probably a duplicate of this one.

Added subscribers: @starweaver, @girafic, @Jewls

Added subscribers: @starweaver, @girafic, @Jewls

Tested here on Windows 10 with RX 480, seems to be fine with Blender 2.91.

Operating system: Windows 10
Graphics card: RX 480

driver_info.png

Blender 2020-11-26 19-17-59_.mp4

Tested here on Windows 10 with RX 480, seems to be fine with Blender 2.91. Operating system: Windows 10 Graphics card: RX 480 ![driver_info.png](https://archive.blender.org/developer/F9382679/driver_info.png) [Blender 2020-11-26 19-17-59_.mp4](https://archive.blender.org/developer/F9382681/Blender_2020-11-26_19-17-59_.mp4)

@girafic, in fact you need two objects to demonstrate the issue. One with alpha material, and one without as stated by @jochem_m

For me, it works fine with a single cube too. As soon as the second one is added with the other material, the viewport display is broken.

@girafic, in fact you need two objects to demonstrate the issue. One with alpha material, and one without as stated by @jochem_m For me, it works fine with a single cube too. As soon as the second one is added with the other material, the viewport display is broken.

Removed subscriber: @Jewls

Removed subscriber: @Jewls

@girafic please, make sure to follow the exact instructions I left before commenting.

@girafic please, make sure to follow the exact instructions I left before commenting.

Re: Drivers: I can also confirm having had this with 19.something drivers before updating, both today and a week or two ago when I tried the beta.

Re: Drivers: I can also confirm having had this with 19.something drivers before updating, both today and a week or two ago when I tried the beta.

@oxben and @ZackMercury-2 also works fine with two objects

Blender 2020-11-28 00-09-40_.mp4

@oxben and @ZackMercury-2 also works fine with two objects [Blender 2020-11-28 00-09-40_.mp4](https://archive.blender.org/developer/F9393497/Blender_2020-11-28_00-09-40_.mp4)

@girafic Followed your exact steps, but encountered the bug when adding the second material slot like @ZackMercury-2
described.

In your first video (from Nov 26th at 7:34pm), you need either two objects like @oxben pointed out, or the second material slot @ZackMercury-2
used.

In your most recent video, you're using 2.82.5, not 2.91. I haven't tested 2.82.5, but 2.90.1 doesn't exhibit this bug so I assume 2.82.5 also doesn't. I was going to test 2.82.5 but I can't find that version on https://download.blender.org/release/

While I was on the release page, I downloaded the latest LTS (2.83.9) and it works fine.

bug_re_Stas.mp4

@girafic Followed your exact steps, but encountered the bug when adding the second material slot like @ZackMercury-2 described. In your first video (from Nov 26th at 7:34pm), you need either two objects like @oxben pointed out, or the second material slot @ZackMercury-2 used. In your most recent video, you're using 2.82.5, not 2.91. I haven't tested 2.82.5, but 2.90.1 doesn't exhibit this bug so I assume 2.82.5 also doesn't. I was going to test 2.82.5 but I can't find that version on https://download.blender.org/release/ While I was on the release page, I downloaded the latest LTS (2.83.9) and it works fine. [bug_re_Stas.mp4](https://archive.blender.org/developer/F9397385/bug_re_Stas.mp4)

@jochem_m ohh, sorry, wrong Blender version, same bug I've also here with Windows 10 and RX 480.

Blender 28.11.2020 10_56_04.png

@jochem_m ohh, sorry, wrong Blender version, same bug I've also here with Windows 10 and RX 480. ![Blender 28.11.2020 10_56_04.png](https://archive.blender.org/developer/F9398158/Blender_28.11.2020_10_56_04.png)

I've tested it on the latest alpha build of Blender 2.92 (November 30, 21:03:39 - 007a0e43a0).
The issue is still present with my Radeon Vega 8.

Do you think there is any chance this bug will be fixed ?
I have no idea if all the AMD GPU users are affected or only a small subset of the AMD GPUs ?

In the mean time it limits my usage of Blender 2.91 on my AMD-based laptop. :-(

I've tested it on the latest alpha build of Blender 2.92 (November 30, 21:03:39 - 007a0e43a01a). The issue is still present with my Radeon Vega 8. Do you think there is any chance this bug will be fixed ? I have no idea if all the AMD GPU users are affected or only a small subset of the AMD GPUs ? In the mean time it limits my usage of Blender 2.91 on my AMD-based laptop. :-(
Member

Removed subscriber: @Alaska

Removed subscriber: @Alaska

Added subscribers: @Julian-4, @APEC

Added subscribers: @Julian-4, @APEC

Added subscriber: @Yatov

Added subscriber: @Yatov

This comment was removed by @Yatov

*This comment was removed by @Yatov*

Problem with Blender 2.91 on AMD GPU rx560x{F9477086}

Problem with Blender 2.91 on AMD GPU rx560x{[F9477086](https://archive.blender.org/developer/F9477086/2020-12-04_17-43-29.mp4)}

Added subscribers: @mano-wii, @iss

Added subscribers: @mano-wii, @iss

I can't reproduce with Radeon RX550/550 Series ATI Technologies Inc. 4.5.14736 Core Profile Context 20.8.3 27.20.12027.1001
@mano-wii can you reproduce this?

I can't reproduce with Radeon RX550/550 Series ATI Technologies Inc. 4.5.14736 Core Profile Context 20.8.3 27.20.12027.1001 @mano-wii can you reproduce this?

Added subscribers: @Richard-Reimer, @Alaska

Added subscribers: @Richard-Reimer, @Alaska

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

I can reproduce.
It's the same problem as #83179 (Issue in viewport/shading mode with Color Type Random and Object)
It is a problem in the driver.

I will look for a driver update as it has been tested with Radeon (TM) RX 480 Graphics ATI Technologies Inc. 4.5.13596 Core Profile Context 20.10 27.20.1034.6

I can reproduce. It's the same problem as #83179 (Issue in viewport/shading mode with Color Type Random and Object) It is a problem in the driver. I will look for a driver update as it has been tested with Radeon (TM) RX 480 Graphics ATI Technologies Inc. 4.5.13596 Core Profile Context 20.10 27.20.1034.6

Added subscriber: @indian_buffalo

Added subscriber: @indian_buffalo

Added subscriber: @Homos

Added subscriber: @Homos
Added subscribers: @carlosmu, @GuillermoEspertino, @Harti, @lichtwerk, @nicholashawkes

Excuse me, how come it is possible that the issue "in the driver" is only present in the latest release and only in Blender?

Excuse me, how come it is possible that the issue "in the driver" is only present in the latest release and only in Blender?

Also, what the hell are we waiting for, what is this "needs triage"?

Also, what the hell are we waiting for, what is this "needs triage"?

@ZackMercury-2 Please keep it civil and polite on the bug tracker. The ticket status is confirmed and it does happen that graphics drivers have bugs that are only apparent under specific circumstances. Although this may as well be a combination of an issue in Blender and a bug in the graphics driver.

@ZackMercury-2 Please keep it civil and polite on the bug tracker. The ticket status is confirmed and it does happen that graphics drivers have bugs that are only apparent under specific circumstances. Although this may as well be a combination of an issue in Blender and a bug in the graphics driver.

I understand your point, but if this worked in 2.90, could we just find what from the changes triggers it and undo?
For me, I rely on transparent meshes quite a lot and this bug is crucial as well as some of the sculpt mode updates that we got in the new version which keeps me using it.
Even if it is a bug from AMD, how soon those lazy bastards are going to fix it? I can't wait that long.

I understand your point, but if this worked in 2.90, could we just find what from the changes triggers it and undo? For me, I rely on transparent meshes quite a lot and this bug is crucial as well as some of the sculpt mode updates that we got in the new version which keeps me using it. Even if it is a bug from AMD, how soon those lazy bastards are going to fix it? I can't wait that long.

In #83022#1071606, @ZackMercury-2 wrote:
I understand your point, but if this worked in 2.90, could we just find what from the changes triggers it and undo?
(...)

There is a workaround yes:

diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c
index 92ce5dddbc6..fa8011f11ab 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.c
+++ b/source/blender/draw/engines/workbench/workbench_engine.c
@@ -542,7 +542,9 @@ void workbench_draw_sample(void *ved)
     if (xray_is_visible) {
       if (do_transparent_pass) {
         GPU_framebuffer_bind(fbl->transp_accum_fb);
-        GPU_framebuffer_clear_color(fbl->transp_accum_fb, clear_col_with_alpha);
+        GPU_texture_clear(wpd->accum_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha);
+        GPU_texture_clear(wpd->reveal_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha);
+        // GPU_framebuffer_clear_color(fbl->transp_accum_fb, clear_col_with_alpha);
 
         DRW_draw_pass(psl->transp_accum_ps);
 

But this may not be good for performance and it may be bad for other hardware.

It is quite possible that the regression came with some automatic windows update (which can install new drivers).

> In #83022#1071606, @ZackMercury-2 wrote: > I understand your point, but if this worked in 2.90, could we just find what from the changes triggers it and undo? > (...) There is a workaround yes: ``` diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c index 92ce5dddbc6..fa8011f11ab 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.c +++ b/source/blender/draw/engines/workbench/workbench_engine.c @@ -542,7 +542,9 @@ void workbench_draw_sample(void *ved) if (xray_is_visible) { if (do_transparent_pass) { GPU_framebuffer_bind(fbl->transp_accum_fb); - GPU_framebuffer_clear_color(fbl->transp_accum_fb, clear_col_with_alpha); + GPU_texture_clear(wpd->accum_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha); + GPU_texture_clear(wpd->reveal_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha); + // GPU_framebuffer_clear_color(fbl->transp_accum_fb, clear_col_with_alpha); DRW_draw_pass(psl->transp_accum_ps); ``` But this may not be good for performance and it may be bad for other hardware. It is quite possible that the regression came with some automatic windows update (which can install new drivers).

I'm using the 2019 driver, it's the one windows automatically installed for me after OS installation. I disabled Windows automatic updates right after installing it.
image.png
Here's my version in the Blender's system-info.txt:
version: '4.5.13559 Core Profile Context 26.20.12028.2'

I'm using the 2019 driver, it's the one windows automatically installed for me after OS installation. I disabled Windows automatic updates right after installing it. ![image.png](https://archive.blender.org/developer/F9497157/image.png) Here's my version in the Blender's system-info.txt: version: '4.5.13559 Core Profile Context 26.20.12028.2'

And even right now, when I click on Update Driver, windows is telling me I'm using the latest driver (even though I'm not).

And even right now, when I click on Update Driver, windows is telling me I'm using the latest driver (even though I'm not).

In addition to @ZackMercury-2 's comment above, the issue does not present itself on 2.90, while it does on 2.91 using the same drivers. It could of course still be a driver issue, but then it's an issue that is triggered in 2.91, but not in 2.90

In addition to @ZackMercury-2 's comment above, the issue does not present itself on 2.90, while it does on 2.91 using the same drivers. It could of course still be a driver issue, but then it's an issue that is triggered in 2.91, but not in 2.90

Updated my driver to the latest version
version: '4.5.13596 Core Profile Context 20.Q4 27.20.11027.5002'
The issue is still there.

Updated my driver to the latest version version: '4.5.13596 Core Profile Context 20.Q4 27.20.11027.5002' The issue is still there.

Any news about the issue?

Any news about the issue?
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

@mano-wii I remember we had some issues with multi attachment clearing on some platforms. It seems to be that the current codebase doesn't have all the workarounds anymore. Note that there are more areas where this could be the case. Can you check if forcing update_attachments in GLFrameBuffer::bind also solves this issue?

P1907: Potential fix for #83022

diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc
index cbb332388dc..b590652c98c 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.cc
+++ b/source/blender/gpu/opengl/gl_framebuffer.cc
@@ -280,8 +280,8 @@ void GLFrameBuffer::bind(bool enabled_srgb)
     }
   }
 
+  this->update_attachments();
   if (dirty_attachments_) {
-    this->update_attachments();
     this->viewport_reset();
     this->scissor_reset();
   }
@mano-wii I remember we had some issues with multi attachment clearing on some platforms. It seems to be that the current codebase doesn't have all the workarounds anymore. Note that there are more areas where this could be the case. Can you check if forcing update_attachments in GLFrameBuffer::bind also solves this issue? [P1907: Potential fix for #83022](https://archive.blender.org/developer/P1907.txt) ```diff diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index cbb332388dc..b590652c98c 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -280,8 +280,8 @@ void GLFrameBuffer::bind(bool enabled_srgb) } } + this->update_attachments(); if (dirty_attachments_) { - this->update_attachments(); this->viewport_reset(); this->scissor_reset(); } ```

@Jeroen-Bakker, I can't test this patch because with it the blender takes forever to load on the gray screen (and do not know if it will finish loading sometime) :
Is there any other way for me to test this?

UPDATE:
Actually it loads, but the screen goes gray

@Jeroen-Bakker, I can't test this patch because with it the blender takes forever to load on the gray screen (and do not know if it will finish loading sometime) :\ Is there any other way for me to test this? UPDATE: Actually it loads, but the screen goes gray

In an attempt to test this "update_attachments", I tried this:

diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c
index bd5b61b26e9..4621c617e82 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.c
+++ b/source/blender/draw/engines/workbench/workbench_engine.c
@@ -28,6 +28,7 @@
 
 #include "BLI_alloca.h"
 
+#include "BKE_global.h"
 - include "BKE_modifier.h"
 - include "BKE_object.h"
 #include "BKE_paint.h"
@@ -536,8 +537,12 @@ void workbench_draw_sample(void *ved)
 
     if (xray_is_visible) {
       if (do_transparent_pass) {
+        G.debug_value = -2;
         GPU_framebuffer_bind(fbl->transp_accum_fb);
         GPU_framebuffer_clear_color(fbl->transp_accum_fb, clear_col_with_alpha);
+        G.debug_value = 0;
+        // GPU_texture_clear(wpd->accum_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha);
+        // GPU_texture_clear(wpd->reveal_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha);
 
         DRW_draw_pass(psl->transp_accum_ps);
 
diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc
index aea19295311..601fd025510 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.cc
+++ b/source/blender/gpu/opengl/gl_framebuffer.cc
@@ -285,6 +285,9 @@ void GLFrameBuffer::bind(bool enabled_srgb)
     this->viewport_reset();
     this->scissor_reset();
   }
+  else if (G.debug_value == -2) {
+    this->update_attachments();
+  }
 
   if (context_->active_fb != this || enabled_srgb_ != enabled_srgb) {
     enabled_srgb_ = enabled_srgb;

But nothing has changed.
(I forgot to mention that the problem is only this in Release Build).

In an attempt to test this "`update_attachments`", I tried this: ``` diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c index bd5b61b26e9..4621c617e82 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.c +++ b/source/blender/draw/engines/workbench/workbench_engine.c @@ -28,6 +28,7 @@ #include "BLI_alloca.h" +#include "BKE_global.h" - include "BKE_modifier.h" - include "BKE_object.h" #include "BKE_paint.h" @@ -536,8 +537,12 @@ void workbench_draw_sample(void *ved) if (xray_is_visible) { if (do_transparent_pass) { + G.debug_value = -2; GPU_framebuffer_bind(fbl->transp_accum_fb); GPU_framebuffer_clear_color(fbl->transp_accum_fb, clear_col_with_alpha); + G.debug_value = 0; + // GPU_texture_clear(wpd->accum_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha); + // GPU_texture_clear(wpd->reveal_buffer_tx, GPU_DATA_FLOAT, clear_col_with_alpha); DRW_draw_pass(psl->transp_accum_ps); diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index aea19295311..601fd025510 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -285,6 +285,9 @@ void GLFrameBuffer::bind(bool enabled_srgb) this->viewport_reset(); this->scissor_reset(); } + else if (G.debug_value == -2) { + this->update_attachments(); + } if (context_->active_fb != this || enabled_srgb_ != enabled_srgb) { enabled_srgb_ = enabled_srgb; ``` But nothing has changed. (I forgot to mention that the problem is only this in Release Build).

Added subscriber: @CHECO62

Added subscriber: @CHECO62

Removed subscriber: @Yatov

Removed subscriber: @Yatov

I have the same problem i'm using amd rx590. any clue how to fix it?

I have the same problem i'm using amd rx590. any clue how to fix it?

In #83022#1110114, @CHECO62 wrote:
I have the same problem i'm using amd rx590. any clue how to fix it?

I have the RX480. I think it's affected all the Polaris models. Next GPU I'll switch to Nvidia... of course.

> In #83022#1110114, @CHECO62 wrote: > I have the same problem i'm using amd rx590. any clue how to fix it? I have the RX480. I think it's affected all the Polaris models. Next GPU I'll switch to Nvidia... of course.

Added subscriber: @PlayerEmers

Added subscriber: @PlayerEmers

bug.mp4

It started happening just now. When i activate x-ray.
My gpu is a RX 580 (Sapphire)
using 2.92 version

funny thing is that its only happening in one blend file
new ones are normal

[bug.mp4](https://archive.blender.org/developer/F9861699/bug.mp4) It started happening just now. When i activate x-ray. My gpu is a RX 580 (Sapphire) using 2.92 version funny thing is that its only happening in one blend file new ones are normal

Re-tested it with the newly released 2.92. I had hope but unfortunately the bug is still there for me too. :-(

GPU: AMD Radeon Vega 8.

Re-tested it with the newly released 2.92. I had hope but unfortunately the bug is still there for me too. :-( GPU: AMD Radeon Vega 8.

Added subscriber: @CreatorSiSo

Added subscriber: @CreatorSiSo

The solution I found (Im using a radeon rx570) was to install the Radeon™ Pro Software for Enterprise version of the driver.

The solution I found (Im using a radeon rx570) was to install the Radeon™ Pro Software for Enterprise version of the driver.

Added subscriber: @Dval

Added subscriber: @Dval

Added subscriber: @Jknb1

Added subscriber: @Jknb1

Added subscribers: @Vortex64, @alectt, @small

Added subscribers: @Vortex64, @alectt, @small

Added subscriber: @typicallyze

Added subscriber: @typicallyze

this issue is still there in the latest experimental builds (2.93 and 3.0)
I have checked most of the driver versions but non of them seem to solve the issue

this issue is still there in the latest experimental builds (2.93 and 3.0) I have checked most of the driver versions but non of them seem to solve the issue

Added subscriber: @Mononoe

Added subscriber: @Mononoe

Removed subscriber: @carlosmu

Removed subscriber: @carlosmu

Added subscriber: @McGybeer

Added subscriber: @McGybeer
Member

Added subscribers: @INdek-2, @PratikPB2123, @hoanguk

Added subscribers: @INdek-2, @PratikPB2123, @hoanguk
Member

Added subscriber: @M_Filmtrip

Added subscriber: @M_Filmtrip
Member

Added subscriber: @jefrau

Added subscriber: @jefrau
Member

Multiple times same issue is reported so may be a high priority report?

Multiple times same issue is reported so may be a high priority report?
Member

In #83022#1212475, @PratikPB2123 wrote:
Multiple times same issue is reported so may be a high priority report?

Could you make a list of affected hardware prior (and add that to the report description)?

> In #83022#1212475, @PratikPB2123 wrote: > Multiple times same issue is reported so may be a high priority report? Could you make a list of affected hardware prior (and add that to the report description)?
Member

Could you make a list of affected hardware prior (and add that to the report description)?

Sure

Edit: added to the description. Will update if I find more

> Could you make a list of affected hardware prior (and add that to the report description)? Sure Edit: added to the description. Will update if I find more

Digging deeper into the problem, I found some things in the code that are related to the bug.
The problem is related to the fact that:

  • wpd->material_buffer_tx and wpd->accum_buffer_tx are the same textures
  • wpd->normal_buffer_tx and wpd->reveal_buffer_tx are the same textures

And for the bug to happen DRW_draw_pass(psl->opaque_ps) and DRW_draw_pass(psl->transp_depth_ps) need to be called at least once.
It's like when these two lines are called, the state of fbl->transp_accum_fb is changed so that GPU_framebuffer_clear_color no longer clears 2 channels of each pixel of the textures.

Here is a file that triggers the bug:
transp_and_opaque_bug.blend

Digging deeper into the problem, I found some things in the code that are related to the bug. The problem is related to the fact that: - `wpd->material_buffer_tx` and `wpd->accum_buffer_tx` are the same textures - `wpd->normal_buffer_tx` and `wpd->reveal_buffer_tx` are the same textures And for the bug to happen `DRW_draw_pass(psl->opaque_ps)` and `DRW_draw_pass(psl->transp_depth_ps)` need to be called at least once. It's like when these two lines are called, the state of `fbl->transp_accum_fb` is changed so that `GPU_framebuffer_clear_color` no longer clears 2 channels of each pixel of the textures. Here is a file that triggers the bug: [transp_and_opaque_bug.blend](https://archive.blender.org/developer/F10338073/transp_and_opaque_bug.blend)
Member

Added subscribers: @tims-4, @EAW

Added subscribers: @tims-4, @EAW
Member

Assuming that #89318 is a duplicate @tims-4 ‘bisected’ this to be caused by 854c999d82

Assuming that #89318 is a duplicate @tims-4 ‘bisected’ this to be caused by 854c999d82

In #83022#1212817, @EAW wrote:
Assuming that #89318 is a duplicate @tims-4 ‘bisected’ this to be caused by 854c999d82

Indeed it seems to be a duplicate. In #89318 the artifacts only appear indirectly due to importing, since the imported model has transparent viewport display colors, but the root cause remains the same. The affected hardware in my tests were Radeon RX 470 and Radeon RX Vega 11 (this one is not yet in the description).

> In #83022#1212817, @EAW wrote: > Assuming that #89318 is a duplicate @tims-4 ‘bisected’ this to be caused by 854c999d82 Indeed it seems to be a duplicate. In #89318 the artifacts only appear indirectly due to importing, since the imported model has transparent viewport display colors, but the root cause remains the same. The affected hardware in my tests were Radeon RX 470 and Radeon RX Vega 11 (this one is not yet in the description).
Member

Added subscribers: @Zanci19, @zJustSimple

Added subscribers: @Zanci19, @zJustSimple
Member

Added subscriber: @Juangmagic

Added subscriber: @Juangmagic

So I tested it on Linux which has opensource AMDGPU driver and everything works fine there.
Are there any folks from AMD here to tag?

So I tested it on Linux which has opensource AMDGPU driver and everything works fine there. Are there any folks from AMD here to tag?
Member

Added subscriber: @miketeiniker

Added subscriber: @miketeiniker

Is there any new or development in fixing this bug yet?

Is there any new or development in fixing this bug yet?

Has this been resolved for blender 2.93 or are the AMD Radeon cards not compatible. Please, if somebody could come back to me regarding this bug.
Do I have to submit a new bug report?

Has this been resolved for blender 2.93 or are the AMD Radeon cards not compatible. Please, if somebody could come back to me regarding this bug. Do I have to submit a new bug report?

Added subscriber: @padone

Added subscriber: @padone

Windows 10 pro 21H1, ryzen 2200G with vega 8, ati driver 21.10.2, blender 2.93.5

Happens here too. The issue seems limited to blender 2.93.5. I can confirm that blender 2.90.1 works fine.

In my case the issue happened after I updated the driver from 19.9.2 to 21.10.2. Reinstalling the old driver 19.9.2 that worked fine before didn't fix the issue. Using the ati utility to cleanup the drivers didn't work either. So I guess somewhat the drivers update broke something. But blender 2.90 doesn't seem to care and works fine anyway. While blender 2.93 is more "picky" and doesn't work.

edit. Test scene included alpha-glitch.blend. In my test scene there are no textures and the issue does appear anyway. So, if I understand correctly, the fix by Germano Cavalcante can't work.

edit. If I may add a comment. We understand that blender works fine with nvidia, so this is an issue with the ati driver and the optimal solution would be for ati to fix it. Nevertheless, since this seems to be around in a while and ati didn't, a fix or workaround from you blender guys would be great so we ati users can enjoy blender better. Then thank you for everything you do, blender is great.

update. Just tested blender 2.93.6 candidate and doesn't work either.

update. Updated windows from 1909 to 21H1 with ati driver 21.10.2, doesn't fix it.

alpha-glitch.jpg

alpha-glitch.blend

Windows 10 pro 21H1, ryzen 2200G with vega 8, ati driver 21.10.2, blender 2.93.5 Happens here too. The issue seems limited to blender 2.93.5. I can confirm that blender 2.90.1 works fine. In my case the issue happened after I updated the driver from 19.9.2 to 21.10.2. Reinstalling the old driver 19.9.2 that worked fine before didn't fix the issue. Using the ati utility to cleanup the drivers didn't work either. So I guess somewhat the drivers update broke something. But blender 2.90 doesn't seem to care and works fine anyway. While blender 2.93 is more "picky" and doesn't work. **edit.** Test scene included alpha-glitch.blend. In my test scene there are no textures and the issue does appear anyway. So, if I understand correctly, the fix by Germano Cavalcante can't work. **edit.** If I may add a comment. We understand that blender works fine with nvidia, so this is an issue with the ati driver and the optimal solution would be for ati to fix it. Nevertheless, since this seems to be around in a while and ati didn't, a fix or workaround from you blender guys would be great so we ati users can enjoy blender better. Then thank you for everything you do, blender is great. **update.** Just tested blender 2.93.6 candidate and doesn't work either. **update.** Updated windows from 1909 to 21H1 with ati driver 21.10.2, doesn't fix it. ![alpha-glitch.jpg](https://archive.blender.org/developer/F11750254/alpha-glitch.jpg) [alpha-glitch.blend](https://archive.blender.org/developer/F11750252/alpha-glitch.blend)
Member

Removed subscriber: @Alaska

Removed subscriber: @Alaska
Member

Added subscriber: @RhysRodrigues

Added subscriber: @RhysRodrigues

Added subscriber: @CJPrinsloo

Added subscriber: @CJPrinsloo

Hey blender guys. Is there any news regarding this bug yet?

Hey blender guys. Is there any news regarding this bug yet?

Removed subscriber: @Harti

Removed subscriber: @Harti
Member

Added subscriber: @KennethThomas

Added subscriber: @KennethThomas
This beta driver fixes it for me https://www.amd.com/en/support/kb/release-notes/rn-rad-win-21-40-beta-blender-3-0

Does it fix the issue for blender 2.93.5?

Does it fix the issue for blender 2.93.5?

Can't install 21.40 beta here, if fails for unsupported hardware. I have a ryzen 2200G with vega 8. Until today 12 dec 2021 at the amd site the recommended driver for my hardware is 21.10.2. That doesn't work fine and gets the alpha glitch.

ati-error.jpg

Can't install 21.40 beta here, if fails for unsupported hardware. I have a ryzen 2200G with vega 8. Until today 12 dec 2021 at the amd site the recommended driver for my hardware is 21.10.2. That doesn't work fine and gets the alpha glitch. ![ati-error.jpg](https://archive.blender.org/developer/F11813362/ati-error.jpg)

In #83022#1254031, @miketeiniker wrote:
Does it fix the issue for blender 2.93.5?

Yes I tried 2.93.5 & 6 and the 3.0.0 beta and It works. I'm using an RX580.

> In #83022#1254031, @miketeiniker wrote: > Does it fix the issue for blender 2.93.5? Yes I tried 2.93.5 & 6 and the 3.0.0 beta and It works. I'm using an RX580.

DF7126CF-307E-4DDF-A8A7-E1C34C3A5995.png
There are still issues. Is there a fix for blender 2.93 with these AMD cards. The updated driver does not seem to work.

![DF7126CF-307E-4DDF-A8A7-E1C34C3A5995.png](https://archive.blender.org/developer/F12675836/DF7126CF-307E-4DDF-A8A7-E1C34C3A5995.png) There are still issues. Is there a fix for blender 2.93 with these AMD cards. The updated driver does not seem to work.

blender 2.93.6, ati driver 21.10.2 (latest for my hardware, 21.40 doesn't install here), ryzen 2200G with Vega 8

I believe I have a game changer here. That's a simple workaround to avoid the glitch and hope helps the developers. At least it works here. Basically you go to object color for the viewport shading so that the viewport materials are not displayed while you edit them, then modify your viewport materials as you wish, then go back to material color for the viewport shading.

Please note that in step 3 you have to assign a material to the new cube. If you don't assign a material then when you go to step 4 the glitch will happen. Once the glitch happens there's no way to fix it in the same session. I have to save the scene, then reset with file > new, then load the scene back, this way I can fix the glitch if it happens.

Again please note that the alpha glitch does not happen with blender 2.90. Also the workaround below may suggest that this is not a driver issue but rather some out of sync with the viewport in blender 2.93 when we edit a material.

how to trigger the alpha glitch

  1. set the viewport shading to material color
  2. for the default cube set a 50% transparent color for the viewport display
  3. create another cube

how to avoid the alpha glitch

  1. set the viewport shading to object color
  2. for the default cube set a 50% transparent color for the viewport display
  3. create another cube, assign a amaterial, and set a 50% transparent color for the viewport display
  4. set the viewport shading to material color

switch.jpg

edit. important note. I just got that the viewport materials must be all transparent to avoid the glitch, if we mix opaque and transparent materials then the glitch will happen. But with all transparent the workaround above works fine. Again hope this helps the developers.

update. Just tested blender 3.0 and it's the same as 2.93.

blender 2.93.6, ati driver 21.10.2 (latest for my hardware, 21.40 doesn't install here), ryzen 2200G with Vega 8 I believe I have a game changer here. That's a simple workaround to avoid the glitch and hope helps the developers. At least it works here. Basically you go to object color for the viewport shading so that the viewport materials are not displayed while you edit them, then modify your viewport materials as you wish, then go back to material color for the viewport shading. Please note that in step 3 you have to assign a material to the new cube. If you don't assign a material then when you go to step 4 the glitch will happen. Once the glitch happens there's no way to fix it in the same session. I have to save the scene, then reset with file > new, then load the scene back, this way I can fix the glitch if it happens. Again please note that the alpha glitch does not happen with blender 2.90. Also the workaround below may suggest that this is not a driver issue but rather some out of sync with the viewport in blender 2.93 when we edit a material. **how to trigger the alpha glitch** 1. set the viewport shading to material color 2. for the default cube set a 50% transparent color for the viewport display 3. create another cube **how to avoid the alpha glitch** 1. set the viewport shading to object color 2. for the default cube set a 50% transparent color for the viewport display 3. create another cube, assign a amaterial, and set a 50% transparent color for the viewport display 4. set the viewport shading to material color ![switch.jpg](https://archive.blender.org/developer/F12688511/switch.jpg) **edit. important note.** I just got that the viewport materials must be all transparent to avoid the glitch, if we mix opaque and transparent materials then the glitch will happen. But with all transparent the workaround above works fine. Again hope this helps the developers. **update.** Just tested blender 3.0 and it's the same as 2.93.

We use a lot of scripting in our addons, which changes the object's alpha value to less than 0. The glitch seems to occur with the change of the alpha value.

We use a lot of scripting in our addons, which changes the object's alpha value to less than 0. The glitch seems to occur with the change of the alpha value.
Member

Added subscriber: @MCsculpt

Added subscriber: @MCsculpt
Member

Added subscriber: @niewiemxze

Added subscriber: @niewiemxze

Removed subscriber: @McGybeer

Removed subscriber: @McGybeer

Added subscriber: @Abdulla563

Added subscriber: @Abdulla563

I am getting similar issue to this and it seems to be related to having multiple materials for the same object but if the object only have one material the alpha doesn't produce this glitch.

I am getting similar issue to this and it seems to be related to having multiple materials for the same object but if the object only have one material the alpha doesn't produce this glitch.
Contributor

Added subscriber: @persun

Added subscriber: @persun
Member

Added subscriber: @Captain_husky

Added subscriber: @Captain_husky
Member

Added subscriber: @FJGC

Added subscriber: @FJGC

Added subscriber: @Corps3

Added subscriber: @Corps3

This comment was removed by @Corps3

*This comment was removed by @Corps3*
Contributor

Interesting. After updating driver to 22.7.1, this does not happen to me anymore. Confirmed in 3.3, 3.2.1, and 2.93.

SuzTransparent.png

(Maybe new driver's OpenGL optimization solved this?)

Windows 10/RX 570 here.

Interesting. After updating driver to 22.7.1, this does not happen to me anymore. Confirmed in 3.3, 3.2.1, and 2.93. ![SuzTransparent.png](https://archive.blender.org/developer/F13323313/SuzTransparent.png) (Maybe new driver's OpenGL optimization solved this?) Windows 10/RX 570 here.

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Germano Cavalcante self-assigned this 2022-07-30 00:34:33 +02:00

I can no longer replicate this problem.
So in fact some update from AMD solved this.
However another very similar bug can still be seen #100034 (Glitches with new AMD drivers (Adrenalin 22.7.1 or 22.8.2) when overlay has transparent images)

I can no longer replicate this problem. So in fact some update from AMD solved this. However another very similar bug can still be seen #100034 (Glitches with new AMD drivers (Adrenalin 22.7.1 or 22.8.2) when overlay has transparent images)

update. I can confirm that the new amd drivers work fine, no more glitches here. I am using the whql 22.5.1 driver with a ryzen 2200G.

**update.** I can confirm that the new amd drivers work fine, no more glitches here. I am using the whql 22.5.1 driver with a ryzen 2200G.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
33 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#83022
No description provided.