В сообщении от Monday 01 March 2010 02:25:01 Francisco Jerez написал(а):
> randrianas...@gmail.com writes:
> > Hello all!
> >
> > After unsuccesfull battle with git-send-email I just send these two
> > patches from Kmail. Botch as attachments and inlin, but inline version
> > probably will be damaged in process.....
>
> Thanks, both patches pushed (after some minor reformatting: please, use
> git-format-patch next time).
Like this?
>
> > Patch 1: add XRGB8888 into nouveau_fbo.c, makes xmoto actually display
> > its demo, not abort
> >
> > diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
> > b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c index 1db8c5d..8464786
> > 100644
> > --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
> > +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
> > @@ -215,6 +215,8 @@ get_tex_format(struct gl_texture_image *ti)
> > switch (ti->TexFormat) {
> > case MESA_FORMAT_ARGB8888:
> > return GL_RGBA8;
> > + case MESA_FORMAT_XRGB8888:
> > + return GL_RGB8;
> > case MESA_FORMAT_RGB565:
> > return GL_RGB5;
> > default:
> >
> >
> > Patch 2: add two stencil operation cases in nv04_state_raster.c, allow
> > demos/reflect and demos/dinoshade actually work. Dinoshade still visible
> > broken. Not sure about redbook/stencil, it looks very same on my modified
> > driver with TNT2 and with swrast. But tests/stencil definitely wrong ....
> > So, all cases are in, one just need to figure out correct assignment.
> >
> > diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
> > b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c index 5e3788d..6d0b262
> > 100644
> > --- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
> > +++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
> > @@ -61,6 +61,10 @@ get_stencil_op(unsigned op)
> > switch (op) {
> > case GL_KEEP:
> > return 0x1;
> > + case GL_ZERO:
> > + return 0x2;
> > + case GL_REPLACE:
> > + return 0x3;
> > case GL_INCR:
> > return 0x4;
> > case GL_DECR:
> >
> > -----
> >
> > Tested-off-by: Andrew Randrianasulu <randrianas...@gmail.com>
From 17fc5664b787c3680b2caeee0c790fff19be8660 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <rand...@mail.ru>
Date: Mon, 1 Mar 2010 23:45:50 +0000
Subject: [PATCH 1/2] trivially add GL_EXT_stencil_wrap
---
src/mesa/drivers/dri/nouveau/nouveau_context.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 2629733..05d408b 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -47,14 +47,15 @@
#include "main/remap_helper.h"
static const struct dri_extension nouveau_extensions[] = {
- { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
{ "GL_ARB_multitexture", NULL },
- { "GL_EXT_texture_lod_bias", NULL },
- { "GL_SGIS_generate_mipmap", NULL },
{ "GL_ARB_texture_env_combine", NULL },
{ "GL_ARB_texture_env_dot3", NULL },
{ "GL_ARB_texture_env_add", NULL },
+ { "GL_EXT_texture_lod_bias", NULL },
+ { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
+ { "GL_EXT_stencil_wrap", NULL },
{ "GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
+ { "GL_SGIS_generate_mipmap", NULL },
{ NULL, NULL }
};
@@ -131,6 +132,7 @@ nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen,
/* Enable any supported extensions. */
driInitExtensions(ctx, nouveau_extensions, GL_TRUE);
+ /* _mesa_disable_extension(ctx, "GL_EXT_texture3D"); */
return GL_TRUE;
}
--
1.6.5.4
From 15cd187717bcbc3b58263513816d3cdef992ea5b Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <rand...@mail.ru>
Date: Mon, 1 Mar 2010 23:58:17 +0000
Subject: [PATCH 2/2] Adding GL_EXT_stencil_wrap for nv04
---
src/mesa/drivers/dri/nouveau/nv04_state_raster.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index 89c6753..4314fc3 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -71,6 +71,10 @@ get_stencil_op(unsigned op)
return 0x5;
case GL_INVERT:
return 0x6;
+ case GL_INCR_WRAP:
+ return 0x7;
+ case GL_DECR_WRAP:
+ return 0x8;
default:
assert(0);
}
--
1.6.5.4
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev