Skip to contentSkip to conversation

Rendering issues with geometry shader

Bug 91780 [email protected] 1 participant 10 messages Aug 27, 2015 – Nov 11, 2015

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=91780

Bug ID: 91780
Summary: Rendering issues with geometry shader
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r600
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

Created attachment 117951
--> https://bugs.freedesktop.org/attachment.cgi?id=117951&action=edit
apitrace which shows the problem

In the attached apitrace, *sometimes* (about 50% of the runs) rendering issues can be observed. They manifest in appearantly missing geometry (compare attached screenshot; the UI has been disabled for taking the apitrace).

Steps to reproduce:
1. DRI_PRIME=1 apitrace replay r600-renderbug-noui.trace
2. If step 1 did not show the behaviour, retry a few times.

Expected results:
Rendering should work and show a terrain without holes

Actual results:
Holes in the terrain

The results have been observed on mesa-11.0.0-rc1 with and without
http://lists.freedesktop.org/archives/mesa-dev/2015-August/092766.html applied.

The same code has never (in 50+ tests) shown the issue on the Intel integrated GPU.

The application which produces the given behaviour can be found at
https://github.com/horazont/scc/tree/f31d90e1579ebda14ce7a0417339b2cd448efde8

The geometry shader is in:
https://github.com/horazont/scc/blob/f31d90e1579ebda14ce7a0417339b2cd448efde8/game/resources/shaders/terrain/main.geom

The usage is in:
https://github.com/horazont/scc/blob/f31d90e1579ebda14ce7a0417339b2cd448efde8/libffengine-render/src/render/fancyterrain.cpp
(search for draw_elements, GL_GEOMETRY_SHADER, GL_LINES_ADJACENCY)

In another commit, the geometry shader has been disabled
(<https://github.com/horazont/scc/commit/4e1e298b02723efcf6555c1c4a7efa31682cf79b>),
which appears to fix the problem or make it very hard to reproduce.

radeon GPU:
Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M] (rev ff) {6630M according to notebook specs} intel GPU:
Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #1 from Jonas Wielicki <[email protected]> --- Created attachment 117952
--> https://bugs.freedesktop.org/attachment.cgi?id=117952&action=edit
screenshot of the problem

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #2 from Dieter Nützel <[email protected]> --- Can you please try with

R600_DEBUG=nosb

And maybe test Mesa-demo 'gsraytrace'?

I got several geometry shader glitches/crashes on Turks, here. Bugs are open:
https://bugs.freedesktop.org/show_bug.cgi?id=83319
https://bugs.freedesktop.org/show_bug.cgi?id=91503

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #3 from Glenn Kennard <[email protected]> --- Dieter, those are unrelated to this issue, which appears to be something specific to GL_LINES_ADJACENCY primitive type.

The piglit test glsl-1.50-geometry-primitive-types GL_TRIANGLE_STRIP_ADJACENCY fails which might be related, but curiously the lines adjacency types pass.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #4 from Jonas Wielicki <[email protected]> --- (In reply to Dieter Nützel from comment #2)

Quoted 3 lines

Can you please try with

R600_DEBUG=nosb

Yes, I tried that (should have mentioned it, sorry) and it shows the problem.

Quoted 1 line

And maybe test Mesa-demo 'gsraytrace'?

Will try that later.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #5 from Dave Airlie <[email protected]> --- just fyi I tested this on CAICOS GPU and SUMO APU today,

and it renders fine on the SUMO but fails similarly on the CAICOS.

This is strange, and it might take someone from AMD doing some research for us.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #6 from Jonas Wielicki <[email protected]> --- (In reply to Dieter Nützel from comment #2)

Quoted 1 line

And maybe test Mesa-demo 'gsraytrace'?

I am having a hard time to get gsraytrace to run. I am not sure whether this is related to this bug or to PRIME issues, as in general, using the Radeon GPU is a bit unstable here. The instability manifests in not receiving any rendering output in the window and sometimes error messages ("radeon: The kernel rejected CS, see dmesg for more information.").

I made two tests:

FIRST TEST

When trying to run the gsraytrace demo on the radeon, I did not receive visual output in the window; no rendering took place, the window contents were never written and were showing what was at that place on the screen before the window opened. The terminal suggested a frame rate of 1 FPS. No crash happened.

I then tried to distinguish between PRIME failure and demo failure by opening a glxgears instance on the radeon gpu, which made the whole X11 freeze for a few seconds and afterwards both glxgears and the gsraytrace demo spammed the above error message.

SECOND TEST

This time, I started glxgears first to make sure that everything was set up properly, PRIME-wise. glxgears was running fine at a reasonable frame rate.

Then I started the gsraytrace demo, which made the X11 freeze. (I then went to fetch some tea) Both programs were spamming the above error message when the GUI had unfreezed.

At no point I ever saw visual output from the gsraytrace demo. As I said, I am not sure what of this is purely due to PRIME and what is caused by the bug this entry refers to. I just wanted to add my data here as it was requested for and I don’t think I will get better results on my own.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #7 from Jonas Wielicki <[email protected]> --- (In reply to Jonas Wielicki from comment #6)

Quoted 6 lines

This time, I started glxgears first to make sure that everything was set up properly, PRIME-wise. glxgears was running fine at a reasonable frame rate.

Then I started the gsraytrace demo, which made the X11 freeze. (I then went to fetch some tea) Both programs were spamming the above error message when the GUI had unfreezed.

Sorry for the spam, here the output of gsraytrace:

```
GL_RENDERER = Gallium 0.4 on AMD TURKS (DRM 2.42.0, LLVM 3.5.0)

ESC                 = exit demo
left mouse + drag   = rotate camera

radeon: The kernel rejected CS, see dmesg for more information.
0.044456 FPS (1 frames in 22.493999 seconds)
radeon: The kernel rejected CS, see dmesg for more information.
[… the above message repeated a few hundred times before I killed it …]
```
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

--- Comment #8 from Marek Olšák <[email protected]> --- (In reply to Dave Airlie from comment #5)

Quoted 6 lines

just fyi I tested this on CAICOS GPU and SUMO APU today,

and it renders fine on the SUMO but fails similarly on the CAICOS.

This is strange, and it might take someone from AMD doing some research for us.

I don't know of any hw bug related to GS that could cause this.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=91780

Dave Airlie <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Dave Airlie <[email protected]> --- this should now be fixed in master.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel