Bug 47955 - Celestia hit fallback on r300g from git?
Summary: Celestia hit fallback on r300g from git?
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-27 10:45 UTC by Andrew Randrianasulu
Modified: 2019-09-18 18:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg (37.96 KB, text/plain)
2012-03-27 10:46 UTC, Andrew Randrianasulu
Details
lspci -vvvn (21.08 KB, text/plain)
2012-03-27 10:47 UTC, Andrew Randrianasulu
Details
X.org log (39.50 KB, text/plain)
2012-03-27 10:48 UTC, Andrew Randrianasulu
Details
glxinfo (12.31 KB, text/plain)
2012-03-27 10:48 UTC, Andrew Randrianasulu
Details
rs600's rom (from sysfs) (52.00 KB, application/octet-stream)
2012-03-27 10:49 UTC, Andrew Randrianasulu
Details
Screenshot (144.01 KB, image/png)
2012-03-27 10:50 UTC, Andrew Randrianasulu
Details

Description Andrew Randrianasulu 2012-03-27 10:45:23 UTC
Hello. 

Using kernel 3.2.9 vanilla (also tried 3.1.0-rc9 + nouveau patches), libdrm/ddx/mesa from git, and X server 1.10.4 i have strange bug on my rs600:

if i start celestia (self-compiled, version 1.6.1, with gtk2 interface) in its default rendering mode - it show mostly white window. Selecting another rendering path, like "basic" or "multitexture" makes it work OK. Witb white window i have extremely low framerates, like 1.x something fps. Tried RADEON_DEBUG options , without luck.

Will add logs and screenshot.
Comment 1 Andrew Randrianasulu 2012-03-27 10:46:04 UTC
Created attachment 59120 [details]
dmesg
Comment 2 Andrew Randrianasulu 2012-03-27 10:47:05 UTC
Created attachment 59121 [details]
lspci -vvvn
Comment 3 Andrew Randrianasulu 2012-03-27 10:48:04 UTC
Created attachment 59122 [details]
X.org log
Comment 4 Andrew Randrianasulu 2012-03-27 10:48:58 UTC
Created attachment 59123 [details]
glxinfo
Comment 5 Andrew Randrianasulu 2012-03-27 10:49:41 UTC
Created attachment 59124 [details]
rs600's rom (from sysfs)
Comment 6 Andrew Randrianasulu 2012-03-27 10:50:16 UTC
Created attachment 59125 [details]
Screenshot
Comment 7 Andrew Randrianasulu 2012-03-27 11:24:08 UTC
Mesa was compiled  with ./configure --prefix=/usr/X11R7 --disable-egl --enable-gallium-llvm --with-gallium-drivers=i915 nouveau r600 r300 swrast --enable-texture-float --with-dri-drivers=i965 r200 radeon nouveau --enable-shared-glapi --enable-gallium-g3dvl --enable-vdpau --enable-debug

Gallium libs - version 2.9. (I tried DRAW_NO_LLVM=1 - bug was still there). llvmpipe renders Celestia's window correctly in all modes.
Comment 8 Andrew Randrianasulu 2012-03-27 22:59:35 UTC
If i set "Star style" to "Points" it works OK, another  two options (default "Fuzzy Points" and "Scaled Disks") produces white slow screen.
Comment 9 Andrew Randrianasulu 2012-03-27 23:17:54 UTC
as far as I can see in celestia-1.6.1/src/celengine/render.cpp (function void Renderer::PointStarVertexBuffer::startSprites() ) - it uses some combination of GL_ARB_point_sprite and vertex shaders .... Any ideas what can fail  with this combo on rs600 ?


----------------------------

void Renderer::PointStarVertexBuffer::startSprites(const GLContext& _context)
{
    context = &_context;
    assert(context->getVertexProcessor() != NULL || !useSprites); // vertex shaders required for new star rendering

    unsigned int stride = sizeof(StarVertex);
    glEnableClientState(GL_VERTEX_ARRAY);
    glVertexPointer(3, GL_FLOAT, stride, &vertices[0].position);
    glEnableClientState(GL_COLOR_ARRAY);
    glColorPointer(4, GL_UNSIGNED_BYTE, stride, &vertices[0].color);

    VertexProcessor* vproc = context->getVertexProcessor();
    vproc->enable();
    vproc->use(vp::starDisc);
    vproc->enableAttribArray(6);
    vproc->attribArray(6, 1, GL_FLOAT, stride, &vertices[0].size);

    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    glDisableClientState(GL_NORMAL_ARRAY);

    glEnable(GL_POINT_SPRITE_ARB);
    glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);

    useSprites = true;
}
--------------------------------------------

Any piglit test?
Comment 10 Andrew Randrianasulu 2012-03-27 23:48:29 UTC
wild guess: r300g need something like  this? 

http://cgit.freedesktop.org/mesa/mesa/commit/?id=022e270b1b972b6d04890f1ac1fc2a4a4ed03ff7
Comment 11 Andrew Randrianasulu 2012-03-28 00:06:42 UTC
Or http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a69b50b3b441ce8f7a00af3a7f02c37df50f6c3

Namely calls to

draw_create_fragment_shader() and draw_bind_fragment_shader() , probably they should go into 300_state.c, r300_{create|bind}_fs_state ?
Comment 12 Michel Dänzer 2012-03-28 00:14:58 UTC
(In reply to comment #7)
> (I tried DRAW_NO_LLVM=1 - bug was still there).


FWIW, that's not a recognized environment variable. You probably meant DRAW_USE_LLVM=0.
Comment 13 Andrew Randrianasulu 2012-03-28 11:04:52 UTC
(In reply to comment #12)
> (In reply to comment #7)
> > (I tried DRAW_NO_LLVM=1 - bug was still there).
> 
> 
> FWIW, that's not a recognized environment variable. You probably meant
> DRAW_USE_LLVM=0.

Yes, sorry. Tried twice with DRAW_USE_LLVM=0 - bug still here. I'll try to patch driver  with my idea above and see if it will fix  this  bug ...
Comment 14 Andrew Randrianasulu 2012-03-28 11:45:44 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #7)
> > > (I tried DRAW_NO_LLVM=1 - bug was still there).
> > 
> > 
> > FWIW, that's not a recognized environment variable. You probably meant
> > DRAW_USE_LLVM=0.
> 
> Yes, sorry. Tried twice with DRAW_USE_LLVM=0 - bug still here. I'll try to
> patch driver  with my idea above and see if it will fix  this  bug ...

Unfortunately, it was not as simple as copy/pasting code ... no patch from me :(
Comment 15 Andrew Randrianasulu 2012-03-29 20:54:13 UTC
.. and spriteblast mesa demo surely don't work correctly here. (I see something remotely like _giant_ sprites flashing on screen)
Comment 16 Marek Olšák 2012-03-30 05:41:30 UTC
Is this bug present in Mesa 8.0 and if yes, is it present in 7.11 as well?
Comment 17 Andrew Randrianasulu 2012-03-30 09:38:25 UTC
(In reply to comment #16)
> Is this bug present in Mesa 8.0 and if yes, is it present in 7.11 as well?

yes, at minimum in 8.0 and 7.11 git _branches_. With 7.11 it was a bit unstable - but bug still around, both for celestia and pointblast/spriteblast mesa demos.
Comment 18 Andrew Randrianasulu 2012-04-04 06:06:20 UTC
Bug still here  with mesa commit 34e53adc51ade8d53d74b6ae35bec90f1a6b9b29 ("r600g: inline r600_upload_index_buffer")
Comment 19 Marek Olšák 2012-04-04 14:01:00 UTC
I know. The vertex shader point size output is broken on SWTCL chipsets (piglit/glsl-vs-point-size fails randomly). I haven't been able to find the cause yet.
Comment 20 GitLab Migration User 2019-09-18 18:50:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/341.


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.