Skip to contentSkip to conversation

nv1x 3d fix/workaround for Q3 demo

PATCH Andrew Randrianasulu 2 participants 2 messages Jul 9, 2011 – Jul 11, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello. I have nv18 card in my machine currently.

It works with kernel 3.0.0.-rc6 (i need to pass nouveau.tv_disable=1 parameter to module, because uothervise it thinks i have TV connected, while in fact I have only VGA CRT monitor connected)

Mesa 3d driver (7.12-devel (git-067c9d7)), on other hand, has few problems, most obvious was wrong colors in Q3 demo menus (blue instead of red). swrast worked fine. After some digging (for example, deactivating EXT_compiled_vertex_array workarounds this bug, like disabling "OpenGL Extensions" from game menu completely) i found that this patch makes colors fine:

(quoted diff) +0 -0

b/src/mesa/drivers/dri/nouveau/nv10_render.c
index 20fb447..7e28229 100644

src/mesa/drivers/dri/nouveau/nv10_render.c +2 -1
@@ -99,7 +99,8 @@ get_hw_format(int type)
        case GL_UNSIGNED_SHORT:
                return NV10_3D_VTXBUF_FMT_TYPE_V16_SNORM;
        case GL_UNSIGNED_BYTE:
-               return NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM;
+               // return NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM;
+               return NV10_3D_VTXBUF_FMT_TYPE_U8_UNORM;
        default:
                assert(0);
        }

Any idea if NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM has any good on BE machines? Or any other use in OpenGL subset, implemented in nv1x class silicon?

I have more failed stuff, like non-working demos/reflect and demos/dinoshade (probably stencil/z mixup or wrong format?), missing teapot in demos/fbotexture (but fbo_firecube works fine), lockup in demos/engine after I activated wireframe mode, and probably many others. But I'm very happy to have this small victory over 3D in just few hours.

A message that is not in the archive (sent off-list or not yet received): 201107091522.36407.randrianasulu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 20 lines · Andrew Randrianasulu

Hello. I have nv18 card in my machine currently.

It works with kernel 3.0.0.-rc6 (i need to pass nouveau.tv_disable=1 parameter to module, because uothervise it thinks i have TV connected, while in fact I have only VGA CRT monitor connected)

Mesa 3d driver (7.12-devel (git-067c9d7)), on other hand, has few problems, most obvious was wrong colors in Q3 demo menus (blue instead of red). swrast worked fine. After some digging (for example, deactivating EXT_compiled_vertex_array workarounds this bug, like disabling "OpenGL Extensions" from game menu completely) i found that this patch makes colors fine:

src/mesa/drivers/dri/nouveau/nv10_render.c +0 -0
index 20fb447..7e28229 100644

src/mesa/drivers/dri/nouveau/nv10_render.c get_hw_format(int type) · line 106

Quoted 9 lines
src/mesa/drivers/dri/nouveau/nv10_render.c +2 -1
@@ -99,7 +99,8 @@ get_hw_format(int type)
        case GL_UNSIGNED_SHORT:
                return NV10_3D_VTXBUF_FMT_TYPE_V16_SNORM;
        case GL_UNSIGNED_BYTE:
-               return NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM;
+               // return NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM;
+               return NV10_3D_VTXBUF_FMT_TYPE_U8_UNORM;
        default:
                assert(0);
        }

Thanks, pushed.
(http://cgit.freedesktop.org/mesa/mesa/commit/?id=a09b7f7f150d1687a614fd59cf09ec5e3c3a13fd)

Quoted 14 lines

Any idea if NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM has any good on BE machines? Or any other use in OpenGL subset, implemented in nv1x class silicon?

I have more failed stuff, like non-working demos/reflect and demos/dinoshade (probably stencil/z mixup or wrong format?), missing teapot in demos/fbotexture (but fbo_firecube works fine), lockup in demos/engine after I activated wireframe mode, and probably many others. But I'm very happy to have this small victory over 3D in just few hours.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau