Blender 2.8 viewport bug #55961

Closed
opened 2018-07-13 04:41:49 +02:00 by padma kumaran · 51 comments

Windows 10 home
AMd HD 5450
All Blender 2.8 versions

Mesh looks triangulated like edges generated from one vertices in edit mode.All version of blender 2.8 has this same problem for me.but the same mesh looks fine on 2.79 version.Even default cube looks triangulated too.sorry for the bad english

wire 2.8.png
2.9 edit.png

2.9 edit.png

Windows 10 home AMd HD 5450 All Blender 2.8 versions Mesh looks triangulated like edges generated from one vertices in edit mode.All version of blender 2.8 has this same problem for me.but the same mesh looks fine on 2.79 version.Even default cube looks triangulated too.sorry for the bad english ![wire 2.8.png](https://archive.blender.org/developer/F3921969/wire_2.8.png) ![2.9 edit.png](https://archive.blender.org/developer/F3921974/2.9_edit.png) ![2.9 edit.png](https://archive.blender.org/developer/F3921978/2.9_edit.png)
Author

Added subscriber: @LoneWOLF

Added subscriber: @LoneWOLF

Added subscriber: @mib2berlin

Added subscriber: @mib2berlin

Hi, add an example .blend, please.
It is much easier to test and fix with the original file.

Cheers, mib

Hi, add an example .blend, please. It is much easier to test and fix with the original file. Cheers, mib
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Marking as incomplete until we have an example .blend

Marking as incomplete until we have an example .blend

Added subscriber: @nokipaike

Added subscriber: @nokipaike

happens with any file in edit mode, I have the same problem too
for the AMD Radeon HD 7670M
https://www.techpowerup.com/gpudb/380/radeon-hd-7670m

adut mode select.png

select sfera.jpg

select2oggetti.jpg

happens with any file in edit mode, I have the same problem too for the AMD Radeon HD 7670M https://www.techpowerup.com/gpudb/380/radeon-hd-7670m ![adut mode select.png](https://archive.blender.org/developer/F3928776/adut_mode_select.png) ![select sfera.jpg](https://archive.blender.org/developer/F3928778/select_sfera.jpg) ![select2oggetti.jpg](https://archive.blender.org/developer/F3928780/select2oggetti.jpg)

Added subscribers: @fclem, @mont29

Added subscribers: @fclem, @mont29
Clément Foucault was assigned by Bastien Montagne 2018-07-25 21:38:51 +02:00

Most certainly a driver issue, not sure we can do much here? @fclem might know better though.

Most certainly a driver issue, not sure we can do much here? @fclem might know better though.

@nokipaike @LoneWOLF Does it happen when rotating the view around the objects?

@nokipaike @LoneWOLF Does it happen when rotating the view around the objects?

In #55961#523046, @fclem wrote:
@nokipaike @LoneWOLF Does it happen when rotating the view around the objects?

this problem appears in particular with the drivers Non-WHQL-64Bit-NIEG-Radeon-Crimson-16.2.1-Win10-Win8.1-Win7-Feb27 which are also the last legacy drivers that amd has released for this generation of video cards ... in another bug report, a user pointed out that by installing a previous version of the drivers this problem vanishes ... answering your question:
when the view is rotated the segments appear and disappear randomly

> In #55961#523046, @fclem wrote: > @nokipaike @LoneWOLF Does it happen when rotating the view around the objects? this problem appears in particular with the drivers Non-WHQL-64Bit-NIEG-Radeon-Crimson-16.2.1-Win10-Win8.1-Win7-Feb27 which are also the last legacy drivers that amd has released for this generation of video cards ... in another bug report, a user pointed out that by installing a previous version of the drivers this problem vanishes ... answering your question: when the view is rotated the segments appear and disappear randomly

Added subscriber: @Saabi

Added subscriber: @Saabi

It´s also happening on my Radeon HD 6570 with an older version of the driver.

I should add that it works fine on 2.79b (so it should be fixable? After all it's just edge drawing and not some sophisticated rendering pipeline)

It´s also happening on my Radeon HD 6570 with an older version of the driver. I should add that it works fine on 2.79b (so it should be fixable? After all it's just edge drawing and not some sophisticated rendering pipeline)

I should add that it works fine on 2.79b (so it should be fixable? After all it's just edge drawing and not some sophisticated rendering pipeline)

In fact the edit mode wireframe shader is one of the most complex shader (eevee excluded) and is drawing nothing like 2.79.

> I should add that it works fine on 2.79b (so it should be fixable? After all it's just edge drawing and not some sophisticated rendering pipeline) In fact the edit mode wireframe shader is one of the most complex shader (eevee excluded) and is drawing nothing like 2.79.

Added subscriber: @Peine_Perdue

Added subscriber: @Peine_Perdue

I have the exact same problem with a Radeon HD 5770 with drivers up to date. Captureaze.PNG

I have the exact same problem with a Radeon HD 5770 with drivers up to date. ![Captureaze.PNG](https://archive.blender.org/developer/F4954526/Captureaze.PNG)

Added subscriber: @Loner-2

Added subscriber: @Loner-2

I have the exact same problem with AMD Radeon HD 7610M.
изображение.png

I have the exact same problem with AMD Radeon HD 7610M. ![изображение.png](https://archive.blender.org/developer/F4964895/изображение.png)

Can you try the new build and see if it makes any difference for you?

Can you try the new build and see if it makes any difference for you?

In #55961#542032, @fclem wrote:
Can you try the new build and see if it makes any difference for you?

blender-2.80-fcc88a6bf04-win64.zip Oct 12 2018 00:35:18
the last build has the same problem.
изображение.png

> In #55961#542032, @fclem wrote: > Can you try the new build and see if it makes any difference for you? blender-2.80-fcc88a6bf04-win64.zip Oct 12 2018 00:35:18 the last build has the same problem. ![изображение.png](https://archive.blender.org/developer/F5040002/изображение.png)

mmhhh seems not updated wait for tomorrow then. (I just kicked the buildbot it should be ready in a few minutes)

mmhhh seems not updated wait for tomorrow then. (I just kicked the buildbot it should be ready in a few minutes)

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

Are you sure the triangulated cube is part of the original bug? You guys might want to click File> Load Factory settings. I remember that the default cube was triangulated by accident on new files, until it was fixed more recently

Are you sure the triangulated cube is part of the original bug? You guys might want to click File> Load Factory settings. I remember that the default cube was triangulated by accident on new files, until it was fixed more recently

Removed subscriber: @moisessalvador

Removed subscriber: @moisessalvador

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

I'll try the new build ASAP.

@moisessalvador This happens on all meshes.

I'll try the new build ASAP. @moisessalvador This happens on all meshes.

@fclem I just tried blender-2.80-2677e992170-win64.zip Oct 12 2018 18:04:20 and it's still not working.

Blender-2.8-2677e992170-win64.PNG

@fclem I just tried blender-2.80-2677e992170-win64.zip Oct 12 2018 18:04:20 and it's still not working. ![Blender-2.8-2677e992170-win64.PNG](https://archive.blender.org/developer/F5045145/Blender-2.8-2677e992170-win64.PNG)

guys I do not know if this should be considered a definitive or temporary solution to this problem for this generation of AMD gpu, but with this version dll the problem is solved.
Just put this dll in the folder of the executable of blender 2.8

Screenshot (52).png
atio6axx.zip

guys I do not know if this should be considered a definitive or temporary solution to this problem for this generation of AMD gpu, but with this version dll the problem is solved. Just put this dll in the folder of the executable of blender 2.8 ![Screenshot (52).png](https://archive.blender.org/developer/F5045413/Screenshot__52_.png) [atio6axx.zip](https://archive.blender.org/developer/F5045420/atio6axx.zip)

@fclem Interestingily enough, I just realized that a static wireframe is corrupted, but while actively rotating (for example) it works alright.

This behaviour is new.

behaviour.mp4

@fclem Interestingily enough, I just realized that a static wireframe is corrupted, but while actively rotating (for example) it works alright. This behaviour is new. [behaviour.mp4](https://archive.blender.org/developer/F5045535/behaviour.mp4)

@nokipaike @fclem The DLL does fix the problem on my machine.

@nokipaike @fclem The DLL does fix the problem on my machine.

In #55961#542160, @nokipaike wrote:
guys I do not know if this should be considered a definitive or temporary solution to this problem for this generation of AMD gpu, but with this version dll the problem is solved.
Just put this dll in the folder of the executable of blender 2.8

Thank you, DLL fixed the problem but it is not a solution to the problem but a crutch. You think the problem is in the driver, but why the version 2.79 is then working fine?

> In #55961#542160, @nokipaike wrote: > guys I do not know if this should be considered a definitive or temporary solution to this problem for this generation of AMD gpu, but with this version dll the problem is solved. > Just put this dll in the folder of the executable of blender 2.8 Thank you, DLL fixed the problem but it is not a solution to the problem but a crutch. You think the problem is in the driver, but why the version 2.79 is then working fine?

Added subscriber: @mano-wii

Added subscriber: @mano-wii

The problem is clearly in the driver.
It is not happening in 2.79 because we changed the way our wireframes are drawn.

To expose the problem:
This, exhibits no issue.

for (int v = 0; v < 3; ++v) {
	doVertex(v);
}

But doing this (which is EXACTLY the same thing):

doVertex(0);
doVertex(1);
doVertex(2);

result in triangle soup.

We are working with @mano-wii (who is also affected by this bug) to try to find a solution but this is really getting old.

The problem is clearly in the driver. It is not happening in 2.79 because we changed the way our wireframes are drawn. To expose the problem: This, exhibits no issue. ``` for (int v = 0; v < 3; ++v) { doVertex(v); } ``` But doing this (which is EXACTLY the same thing): ``` doVertex(0); doVertex(1); doVertex(2); ``` result in triangle soup. We are working with @mano-wii (who is also affected by this bug) to try to find a solution but this is really getting old.

@Loner-2
the logic in this case would like to launch a petition for AMD to release drivers working well for these gpu, threatening that if they do not fix this bug, the next gpu, since these gpu are old enough .. will be NVIDIA
hehehe

@Loner-2 the logic in this case would like to launch a petition for AMD to release drivers working well for these gpu, threatening that if they do not fix this bug, the next gpu, since these gpu are old enough .. will be NVIDIA hehehe

Added subscriber: @Znio.G

Added subscriber: @Znio.G

hi @fclem i also found a related bug but on windows 10 with GTX 1050 ti, it's reproducible each time in edit mode ,even if you just transform one face it will switch from solid to wireframes when the mesh is off screen, especially going south and adding operations the 4 directions start to show the same effect...here is a quick demonstration.new.gif

hi @fclem i also found a related bug but on windows 10 with GTX 1050 ti, it's reproducible each time in edit mode ,even if you just transform one face it will switch from solid to wireframes when the mesh is off screen, especially going south and adding operations the 4 directions start to show the same effect...here is a quick demonstration.![new.gif](https://archive.blender.org/developer/F5059355/new.gif)

In #55961#542263, @nokipaike wrote:
@Loner-2
the logic in this case would like to launch a petition for AMD to release drivers working well for these gpu, threatening that if they do not fix this bug, the next gpu, since these gpu are old enough .. will be NVIDIA
hehehe

Agree.

> In #55961#542263, @nokipaike wrote: > @Loner-2 > the logic in this case would like to launch a petition for AMD to release drivers working well for these gpu, threatening that if they do not fix this bug, the next gpu, since these gpu are old enough .. will be NVIDIA > hehehe Agree.

Removed subscriber: @moisessalvador

Removed subscriber: @moisessalvador

In #55961#542264, @Znio.G wrote:
hi @fclem i also found a related bug but on windows 10 with GTX 1050 ti, it's reproducible each time in edit mode ,even if you just transform one face it will switch from solid to wireframes when the mesh is off screen, especially going south and adding operations the 4 directions start to show the same effect...here is a quick demonstration.new.gif

This has nothing to do with the driver or this report. Please create another report, I know what's happening here.

> In #55961#542264, @Znio.G wrote: > hi @fclem i also found a related bug but on windows 10 with GTX 1050 ti, it's reproducible each time in edit mode ,even if you just transform one face it will switch from solid to wireframes when the mesh is off screen, especially going south and adding operations the 4 directions start to show the same effect...here is a quick demonstration.![new.gif](https://archive.blender.org/developer/F5059355/new.gif) This has nothing to do with the driver or this report. Please create another report, I know what's happening here.

I wrote in support of AMD. Pointed out about the problem and asked if they will update the driver. As soon as they answer, I'll add their answer here.

I wrote in support of AMD. Pointed out about the problem and asked if they will update the driver. As soon as they answer, I'll add their answer here.

I have some theories, but I'm not sure why the compiler is buggy in this driver.
Here is the solution I have found:
P796: Patch to #55961

diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl
index 61f3e818020..3b7af9108e2 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl
@@ -48,14 +48,22 @@ vec2 proj(vec4 pos)
 	return (0.5 * (pos.xy / pos.w) + 0.5) * viewportSize;
 }
 
+#ifdef VERTEX_SELECTION
+vec3 vertex_color[3];
+#endif
+
+#ifdef VERTEX_FACING
+float v_facing[3];
+#endif
+
 void doVertex(int v)
 {
 #ifdef VERTEX_SELECTION
-	vertexColor = EDIT_MESH_vertex_color(vData- [x].x).rgb;
+	vertexColor = vertex_color[v];
 #endif
 
 #ifdef VERTEX_FACING
-	facing = vFacing[v];
+	facing = v_facing[v];
 #endif
 	gl_Position = pPos[v];
 
@@ -65,11 +73,11 @@ void doVertex(int v)
 void doVertexOfs(int v, vec2 fixvec)
 {
 #ifdef VERTEX_SELECTION
-	vertexColor = EDIT_MESH_vertex_color(vData- [x].x).rgb;
+	vertexColor = vertex_color[v];
 #endif
 
 #ifdef VERTEX_FACING
-	facing = vFacing[v];
+	facing = v_facing[v];
 #endif
 	gl_Position = pPos[v];
 
@@ -162,6 +170,18 @@ void main()
 		}
 	}
 
+#ifdef VERTEX_SELECTION
+	vertex_color- [x] = EDIT_MESH_vertex_color(vData- [x].x).rgb;
+	vertex_color- [x] = EDIT_MESH_vertex_color(vData- [x].x).rgb;
+	vertex_color- [x] = EDIT_MESH_vertex_color(vData- [x].x).rgb;
+#endif
+
+#ifdef VERTEX_FACING
+	v_facing- [x] = vFacing[0];
+	v_facing- [x] = vFacing[1];
+	v_facing- [x] = vFacing[2];
+#endif
+
 	/* Remember that we are assuming the last vertex
 	 * of a triangle is the provoking vertex (decide what flat attribs are). */
 

We still need to benchmark (and do other tests).

I have some theories, but I'm not sure why the compiler is buggy in this driver. Here is the solution I have found: [P796: Patch to #55961](https://archive.blender.org/developer/P796.txt) ``` diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl index 61f3e818020..3b7af9108e2 100644 --- a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl +++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl @@ -48,14 +48,22 @@ vec2 proj(vec4 pos) return (0.5 * (pos.xy / pos.w) + 0.5) * viewportSize; } +#ifdef VERTEX_SELECTION +vec3 vertex_color[3]; +#endif + +#ifdef VERTEX_FACING +float v_facing[3]; +#endif + void doVertex(int v) { #ifdef VERTEX_SELECTION - vertexColor = EDIT_MESH_vertex_color(vData- [x].x).rgb; + vertexColor = vertex_color[v]; #endif #ifdef VERTEX_FACING - facing = vFacing[v]; + facing = v_facing[v]; #endif gl_Position = pPos[v]; @@ -65,11 +73,11 @@ void doVertex(int v) void doVertexOfs(int v, vec2 fixvec) { #ifdef VERTEX_SELECTION - vertexColor = EDIT_MESH_vertex_color(vData- [x].x).rgb; + vertexColor = vertex_color[v]; #endif #ifdef VERTEX_FACING - facing = vFacing[v]; + facing = v_facing[v]; #endif gl_Position = pPos[v]; @@ -162,6 +170,18 @@ void main() } } +#ifdef VERTEX_SELECTION + vertex_color- [x] = EDIT_MESH_vertex_color(vData- [x].x).rgb; + vertex_color- [x] = EDIT_MESH_vertex_color(vData- [x].x).rgb; + vertex_color- [x] = EDIT_MESH_vertex_color(vData- [x].x).rgb; +#endif + +#ifdef VERTEX_FACING + v_facing- [x] = vFacing[0]; + v_facing- [x] = vFacing[1]; + v_facing- [x] = vFacing[2]; +#endif + /* Remember that we are assuming the last vertex * of a triangle is the provoking vertex (decide what flat attribs are). */ ``` We still need to benchmark (and do other tests).

@mano-wii

I'm not familiar at all with the blender source code, but it appears your fix involves copying the data to a small local buffer in a place where the compiler won't screw up (or by using literals), and then using that buffer everywhere else. Am I right?

Asking because I am curious about it and interested in possibly contributing down the line.

Let me know when it's available for download and I'll try it out.

@mano-wii I'm not familiar at all with the blender source code, but it appears your fix involves copying the data to a small local buffer in a place where the compiler won't screw up (or by using literals), and then using that buffer everywhere else. Am I right? Asking because I am curious about it and interested in possibly contributing down the line. Let me know when it's available for download and I'll try it out.

This issue was referenced by 9a38a91f41

This issue was referenced by 9a38a91f411b721eb8f61401fdc86521933aec87

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

In #55961#542444, @Saabi wrote:
I'm not familiar at all with the blender source code, but it appears your fix involves copying the data to a small local buffer in a place where the compiler won't screw up (or by using literals), and then using that buffer everywhere else. Am I right?

Nor do I know for sure why it solves. It has something to do with varying alignment + multithread. It's all guess.

In #55961#542444, @Saabi wrote:
(...)
Let me know when it's available for download and I'll try it out.

At the latest, in tomorrow's build ;)

> In #55961#542444, @Saabi wrote: > I'm not familiar at all with the blender source code, but it appears your fix involves copying the data to a small local buffer in a place where the compiler won't screw up (or by using literals), and then using that buffer everywhere else. Am I right? Nor do I know for sure why it solves. It has something to do with varying alignment + multithread. It's all guess. > In #55961#542444, @Saabi wrote: > (...) > Let me know when it's available for download and I'll try it out. At the latest, in tomorrow's build ;)

And so it was that the valiant Knights Companions of Adventures, after months and months of mysterious apparitions of an epileptic phantom, managed to find, trick and finally trap and tear down the mysterious monster that hid insidious in the caves now abandoned by Advanced Monster Devices.

The_Red_Cross_Knight_enters_the_Monster's_Cave.png

> *And so it was that the valiant Knights Companions of Adventures, after months and months of mysterious apparitions of an epileptic phantom, managed to find, trick and finally trap and tear down the mysterious monster that hid insidious in the caves now abandoned by Advanced Monster Devices.* ![The_Red_Cross_Knight_enters_the_Monster's_Cave.png](https://archive.blender.org/developer/F5068118/The_Red_Cross_Knight_enters_the_Monster_s_Cave.png)

In #55961#542452, @mano-wii wrote:
At the latest, in tomorrow's build ;)

blender-2.80-55e3c17ccc1-win64.zip - checked.
The problem remained. Only with the help a crutch that proposed noki paike (amonpaike) works. AMD hasn't responded to my update request yet. Maybe Sebastian Ferreyra (Saabi) will work.

> In #55961#542452, @mano-wii wrote: > At the latest, in tomorrow's build ;) blender-2.80-55e3c17ccc1-win64.zip - checked. The problem remained. Only with the help a crutch that proposed noki paike (amonpaike) works. AMD hasn't responded to my update request yet. Maybe Sebastian Ferreyra (Saabi) will work.

@Loner-2 This is an older build from the 13th.

@Loner-2 This is an older build from the 13th.

In #55961#543001, @fclem wrote:
@Loner-2 This is an older build from the 13th.

build - blender-2.80-eba1b0487c8-win64
For my part, I confirm that the problem is solved.

> In #55961#543001, @fclem wrote: > @Loner-2 This is an older build from the 13th. build - blender-2.80-eba1b0487c8-win64 For my part, I confirm that the problem is solved.

blender-2.80.0-git.3f3eae675aa-windows64 is working for me as well.

blender-2.80.0-git.3f3eae675aa-windows64 is working for me as well.

build - blender-2.80.0-git.a30c9f710a6-windows64

problem solved on HD5770 !

build - blender-2.80.0-git.a30c9f710a6-windows64 problem solved on HD5770 !
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
No Assignees
13 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#55961
No description provided.