Bug 30684 - [r300g][OpenVG] OpenVG demos fail to render properly
Summary: [r300g][OpenVG] OpenVG demos fail to render properly
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-07 10:37 UTC by Sergey Kondakov
Modified: 2010-12-01 18:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
lion_x11.jpg (11.92 KB, image/jpeg)
2010-10-07 10:45 UTC, Sergey Kondakov
Details
sp_x11.jpg (9.66 KB, image/jpeg)
2010-10-07 10:45 UTC, Sergey Kondakov
Details
openvg 1.1 lion on r300g.jpg (8.33 KB, image/jpeg)
2010-12-01 06:50 UTC, Sergey Kondakov
Details
openvg 1.1 sp on r300g.jpg (15.23 KB, image/jpeg)
2010-12-01 06:51 UTC, Sergey Kondakov
Details
openvg 1.1 text on r300g.jpg (6.68 KB, image/jpeg)
2010-12-01 06:52 UTC, Sergey Kondakov
Details
possible fix (4.20 KB, patch)
2010-12-01 08:04 UTC, Marek Olšák
Details | Splinter Review
openvg 1.1 lion with patch.jpg (32.12 KB, image/jpeg)
2010-12-01 09:11 UTC, Sergey Kondakov
Details
openvg 1.1 sp with patch.jpg (15.79 KB, image/jpeg)
2010-12-01 09:11 UTC, Sergey Kondakov
Details
openvg 1.1 text with patch.jpg (6.83 KB, image/jpeg)
2010-12-01 09:14 UTC, Sergey Kondakov
Details
slow lion from r770 with r600g and mesa-git right after r300g-opcode-patch.jpg (32.94 KB, image/jpeg)
2010-12-01 11:14 UTC, Sergey Kondakov
Details

Description Sergey Kondakov 2010-10-07 10:37:41 UTC
lion_x11: all i see is counterclockwise rotating black figure which stops if i move the window and then start rotating again. it disappears if i maximize window to fullscreen.
sp_x11: just a black figure on white background.
Comment 1 Sergey Kondakov 2010-10-07 10:45:18 UTC
Created attachment 39259 [details]
lion_x11.jpg
Comment 2 Sergey Kondakov 2010-10-07 10:45:42 UTC
Created attachment 39260 [details]
sp_x11.jpg
Comment 3 Ivan Sukin 2010-10-11 10:27:12 UTC
(In reply to comment #0)
> lion_x11: all i see is counterclockwise rotating black figure which stops if i
> move the window and then start rotating again. it disappears if i maximize
> window to fullscreen.
> sp_x11: just a black figure on white background.

I also have this bug.
Comment 4 Sergey Kondakov 2010-12-01 06:50:06 UTC
Created attachment 40701 [details]
openvg 1.1 lion on r300g.jpg

this is how it looks after recent changes
Comment 5 Sergey Kondakov 2010-12-01 06:51:05 UTC
Created attachment 40702 [details]
openvg 1.1 sp on r300g.jpg

heh, you can even see something here
Comment 6 Sergey Kondakov 2010-12-01 06:52:12 UTC
Created attachment 40703 [details]
openvg 1.1 text on r300g.jpg

it also says:
"EGL_VERSION = 1.4 (Gallium)
using OpenVG text support
r300: Unknown TGSI/RC opcode: CLAMP
r300 FP: Compiler Error:
r500_fragprog_emit.c::translate_rgb_op(): translate_rgb_op: unknown opcode ILLEGAL OPCODE

Using a dummy shader instead.
XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0"
      after 179008 requests (179008 known processed) with 0 events remaining."

in console
Comment 7 Marek Olšák 2010-12-01 08:04:18 UTC
Created attachment 40706 [details] [review]
possible fix

Could you possibly try this patch?
Comment 8 Sergey Kondakov 2010-12-01 09:11:11 UTC
Created attachment 40710 [details]
openvg 1.1 lion with patch.jpg

holy bytes! now i can see an actual picture. but still it suspiciously rotating.
Comment 9 Sergey Kondakov 2010-12-01 09:11:53 UTC
Created attachment 40711 [details]
openvg 1.1 sp with patch.jpg
Comment 10 Sergey Kondakov 2010-12-01 09:14:46 UTC
Created attachment 40712 [details]
openvg 1.1 text with patch.jpg

still looks ugly but there is no error message anymore.
and it flashing black when i resizing its window, text itself is not resizing but it's there. probably just redrawing itself that ugly.
Comment 11 Marek Olšák 2010-12-01 09:39:34 UTC
OpenVG is still being actively developed. I can't say if this bug should be attributed to us (r300g) or the state tracker (st/vega). I need some clue as to what is wrong there. Have you tried the softpipe driver?
Comment 12 Marek Olšák 2010-12-01 10:28:11 UTC
I've just had a look at st/vega source code and found a shader which can't run on DX9-class hardware, like r500 and nv40. The shader in question is "convolution_asm" in asm_filters.h. The presence of ARL makes it require DX10-class hardware but the loop and break instructions are not nice either (not supported in shader model 2.0).
Comment 13 Sergey Kondakov 2010-12-01 10:57:52 UTC
i don't know how it should look either :) i just know that before this patch and recent big changes it was just ugly black stuff in ugly white box.

we should probably ask someone who wrote those demos.
is it possible to use different gallium driver on-the-fly without X restart, library rename, etc. ?

if it should look like it looks on recent screenshots then this is, probably, _fixed_.
on r600g (R770) those demos were outright segfaulting before openvg 1.1 bump and now they look indistinguishable from those last r300g screenshots with 2 exceptions though: 
1) lion rotating much slower and much more sluggish than on r300g machine and looks more colourful.
maybe it uses software rendering for openvg for some reason and this is how it supposed to look ? i will provide a picture
2) no text in "text" demo and it says:
"EE r600_shader.c/tgsi_unsupported:868 - 25 tgsi opcode unsupported
EE r600_shader.c/r600_pipe_shader_create:339 - translation from TGSI failed !"

but this is probably not in your department and topic of another bug report which should be filled.

anyway, i'm happy that openvg can actually draw something coherent on real gallium drivers. maybe it will finally be a reason for those cairo guys to fix their drm/kms & gallium & openvg & xcb "support", for 2D GUI/DE/vector graphic editor people to utilize it and such.
Comment 14 Sergey Kondakov 2010-12-01 11:14:58 UTC
Created attachment 40713 [details]
slow lion from r770 with r600g and mesa-git right after r300g-opcode-patch.jpg

there is a memory leak :(
this demo, on both r300g and r600g, eats up memory very fast (and ~5 times faster on r300g where it also rotates faster).
it also uses ~70-80% CPU time _on both_ machines.
Comment 15 Sergey Kondakov 2010-12-01 11:23:48 UTC
hm. now then i look at it as two screenshots one-to-one and not two monitors side-by-side, they look identical. must have been LCD differences :(
everything else stands though.
Comment 16 Marek Olšák 2010-12-01 18:26:37 UTC
(In reply to comment #14)
> there is a memory leak :(
> this demo, on both r300g and r600g, eats up memory very fast (and ~5 times
> faster on r300g where it also rotates faster).
> it also uses ~70-80% CPU time _on both_ machines.

Since r300g doesn't leak any memory when used as an OpenGL driver, I guess it's just st/vega that causes this.

I think r600g rotates the lion slower because it's slower than r300g. The speed of the animation seems to depedent on framerate.
Comment 17 Marek Olšák 2010-12-01 18:30:14 UTC
Since there isn't any other r300g-specific issue with st/vega, I am closing this bug. Feel free to file a new one if you encounter any other issues. The memory leak bug should probably be filed against Mesa core.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.