packages: Mesa/Mesa.spec, Mesa/Mesa-nouveau-classic-libdrm.patch (NEW), Mes...

baggins baggins at pld-linux.org
Mon Mar 14 12:15:55 CET 2011


Author: baggins                      Date: Mon Mar 14 11:15:55 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- nouveau updates wrt libdrm 2.4.24

---- Files affected:
packages/Mesa:
   Mesa.spec (1.271 -> 1.272) , Mesa-nouveau-classic-libdrm.patch (NONE -> 1.1)  (NEW), Mesa-nouveau-revert.patch (NONE -> 1.1)  (NEW), Mesa-nouveau-updates.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/Mesa/Mesa.spec
diff -u packages/Mesa/Mesa.spec:1.271 packages/Mesa/Mesa.spec:1.272
--- packages/Mesa/Mesa.spec:1.271	Mon Mar 14 12:04:40 2011
+++ packages/Mesa/Mesa.spec	Mon Mar 14 12:15:50 2011
@@ -38,6 +38,9 @@
 Patch0:		%{name}-realclean.patch
 Patch1:		%{name}-selinux.patch
 Patch2:		%{name}-git.patch
+Patch3:		%{name}-nouveau-updates.patch
+Patch4:		%{name}-nouveau-revert.patch
+Patch5:		%{name}-nouveau-classic-libdrm.patch
 URL:		http://www.mesa3d.org/
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake
@@ -674,6 +677,9 @@
 %patch0 -p0
 %patch1 -p1
 #patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %{__aclocal}
@@ -1016,6 +1022,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.272  2011/03/14 11:15:50  baggins
+- nouveau updates wrt libdrm 2.4.24
+
 Revision 1.271  2011/03/14 11:04:40  baggins
 - 7.10.1
 - disabled git patch

================================================================
Index: packages/Mesa/Mesa-nouveau-classic-libdrm.patch
diff -u /dev/null packages/Mesa/Mesa-nouveau-classic-libdrm.patch:1.1
--- /dev/null	Mon Mar 14 12:15:55 2011
+++ packages/Mesa/Mesa-nouveau-classic-libdrm.patch	Mon Mar 14 12:15:50 2011
@@ -0,0 +1,33 @@
+From c43905b6c43ac34bbcb5a9e44414fa500e5cebeb Mon Sep 17 00:00:00 2001
+From: Ben Skeggs <bskeggs at redhat.com>
+Date: Mon, 17 Jan 2011 12:54:27 +1000
+Subject: [PATCH 3/3] mesa-7.10-nouveau-classic-libdrm
+
+Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
+---
+ src/mesa/drivers/dri/nouveau/nouveau_driver.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
+index 8036b18..c5ac128 100644
+--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.h
++++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
+@@ -38,7 +38,6 @@
+ #include <assert.h>
+ 
+ #include "nouveau_device.h"
+-#include "nouveau_pushbuf.h"
+ #include "nouveau_grobj.h"
+ #include "nouveau_channel.h"
+ #include "nouveau_bo.h"
+@@ -46,6 +45,7 @@
+ #include "nouveau_screen.h"
+ #include "nouveau_state.h"
+ #include "nouveau_surface.h"
++#include "nv04_pushbuf.h"
+ 
+ #define DRIVER_DATE	"20091015"
+ #define DRIVER_AUTHOR	"Nouveau"
+-- 
+1.7.3.4
+

================================================================
Index: packages/Mesa/Mesa-nouveau-revert.patch
diff -u /dev/null packages/Mesa/Mesa-nouveau-revert.patch:1.1
--- /dev/null	Mon Mar 14 12:15:55 2011
+++ packages/Mesa/Mesa-nouveau-revert.patch	Mon Mar 14 12:15:50 2011
@@ -0,0 +1,114 @@
+From 20f77c532547c7f8f1cb26f41357037821cf2a9f Mon Sep 17 00:00:00 2001
+From: Ben Skeggs <bskeggs at redhat.com>
+Date: Mon, 17 Jan 2011 12:47:12 +1000
+Subject: [PATCH 2/3] mesa-7.10-nouveau-revert.patch
+
+Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
+---
+ src/gallium/drivers/nv50/nv50_context.c      |    4 ----
+ src/gallium/drivers/nv50/nv50_shader_state.c |    2 +-
+ src/gallium/drivers/nv50/nv50_state.c        |    5 ++---
+ src/gallium/drivers/nv50/nv50_vbo.c          |    2 +-
+ src/gallium/drivers/nvc0/nvc0_screen.c       |    2 +-
+ src/gallium/drivers/nvfx/nvfx_vbo.c          |   14 +++++++++++---
+ 6 files changed, 16 insertions(+), 13 deletions(-)
+
+diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
+index 4f97616..0874cb5 100644
+--- a/src/gallium/drivers/nv50/nv50_context.c
++++ b/src/gallium/drivers/nv50/nv50_context.c
+@@ -49,10 +49,6 @@ nv50_destroy(struct pipe_context *pipe)
+ 	struct nv50_context *nv50 = nv50_context(pipe);
+ 	int i;
+ 
+-        for (i = 0; i < nv50->vtxbuf_nr; i++) {
+-           pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
+-        }
+-
+ 	for (i = 0; i < 64; i++) {
+ 		if (!nv50->state.hw[i])
+ 			continue;
+diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
+index 1c1b66d..306aa81 100644
+--- a/src/gallium/drivers/nv50/nv50_shader_state.c
++++ b/src/gallium/drivers/nv50/nv50_shader_state.c
+@@ -71,7 +71,7 @@ nv50_transfer_constbuf(struct nv50_context *nv50,
+       map += nr;
+    }
+ 
+-   pipe_buffer_unmap(pipe, transfer);
++   pipe_buffer_unmap(pipe, buf, transfer);
+ }
+ 
+ static void
+diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
+index b4eda0f..04291e4 100644
+--- a/src/gallium/drivers/nv50/nv50_state.c
++++ b/src/gallium/drivers/nv50/nv50_state.c
+@@ -779,9 +779,8 @@ nv50_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
+ {
+ 	struct nv50_context *nv50 = nv50_context(pipe);
+ 
+-        util_copy_vertex_buffers(nv50->vtxbuf,
+-                                 &nv50->vtxbuf_nr,
+-                                 vb, count);
++	memcpy(nv50->vtxbuf, vb, sizeof(*vb) * count);
++	nv50->vtxbuf_nr = count;
+ 
+ 	nv50->dirty |= NV50_NEW_ARRAYS;
+ }
+diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
+index 53f319a..d41a59d 100644
+--- a/src/gallium/drivers/nv50/nv50_vbo.c
++++ b/src/gallium/drivers/nv50/nv50_vbo.c
+@@ -284,7 +284,7 @@ nv50_draw_elements_inline(struct pipe_context *pipe,
+ 		nzi = TRUE;
+ 	}
+ 
+-	pipe_buffer_unmap(pipe, transfer);
++	pipe_buffer_unmap(pipe, indexBuffer, transfer);
+ }
+ 
+ static void
+diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
+index f608b32..e14d4fd 100644
+--- a/src/gallium/drivers/nvc0/nvc0_screen.c
++++ b/src/gallium/drivers/nvc0/nvc0_screen.c
+@@ -110,7 +110,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
+    case PIPE_CAP_SHADER_STENCIL_EXPORT:
+       return 0;
+    case PIPE_CAP_PRIMITIVE_RESTART:
+-   case PIPE_CAP_INSTANCED_DRAWING:
++//   case PIPE_CAP_INSTANCED_DRAWING:
+       return 1;
+    default:
+       NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
+diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
+index 01dacb4..1c88f5f 100644
+--- a/src/gallium/drivers/nvfx/nvfx_vbo.c
++++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
+@@ -591,10 +591,18 @@ nvfx_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
+ {
+ 	struct nvfx_context *nvfx = nvfx_context(pipe);
+ 
+-        util_copy_vertex_buffers(nvfx->vtxbuf,
+-                                 &nvfx->vtxbuf_nr,
+-                                 vb, count);
++	for(unsigned i = 0; i < count; ++i)
++	{
++		pipe_resource_reference(&nvfx->vtxbuf[i].buffer, vb[i].buffer);
++		nvfx->vtxbuf[i].buffer_offset = vb[i].buffer_offset;
++		nvfx->vtxbuf[i].max_index = vb[i].max_index;
++		nvfx->vtxbuf[i].stride = vb[i].stride;
++	}
++
++	for(unsigned i = count; i < nvfx->vtxbuf_nr; ++i)
++		pipe_resource_reference(&nvfx->vtxbuf[i].buffer, 0);
+ 
++	nvfx->vtxbuf_nr = count;
+ 	nvfx->use_vertex_buffers = -1;
+ 	nvfx->draw_dirty |= NVFX_NEW_ARRAYS;
+ }
+-- 
+1.7.3.4
+

================================================================
Index: packages/Mesa/Mesa-nouveau-updates.patch
diff -u /dev/null packages/Mesa/Mesa-nouveau-updates.patch:1.1
--- /dev/null	Mon Mar 14 12:15:55 2011
+++ packages/Mesa/Mesa-nouveau-updates.patch	Mon Mar 14 12:15:50 2011
@@ -0,0 +1,19963 @@
+From 417e136ecef44324035c2c124dd184f14af03c44 Mon Sep 17 00:00:00 2001
+From: Ben Skeggs <bskeggs at redhat.com>
+Date: Mon, 17 Jan 2011 12:44:46 +1000
+Subject: [PATCH 1/3] mesa-7.10-nouveau-updates
+
+Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
+---
+ configure.ac                                       |    2 +-
+ src/gallium/drivers/nouveau/nouveau_screen.h       |    3 +-
+ src/gallium/drivers/nouveau/nouveau_winsys.h       |    7 +-
+ src/gallium/drivers/nouveau/nv_object.xml.h        |   57 +-
+ src/gallium/drivers/nv50/nv50_context.c            |    4 +
+ src/gallium/drivers/nv50/nv50_shader_state.c       |    2 +-
+ src/gallium/drivers/nv50/nv50_state.c              |   14 +-
+ src/gallium/drivers/nv50/nv50_surface.c            |    2 +-
+ src/gallium/drivers/nv50/nv50_vbo.c                |    2 +-
+ src/gallium/drivers/nvc0/Makefile                  |   34 +
+ src/gallium/drivers/nvc0/SConscript                |   36 +
+ src/gallium/drivers/nvc0/nv50_defs.xml.h           |  142 ++
+ src/gallium/drivers/nvc0/nv50_texture.xml.h        |  259 +++
+ src/gallium/drivers/nvc0/nvc0_2d.xml.h             |  380 ++++
+ src/gallium/drivers/nvc0/nvc0_3d.xml.h             | 1183 ++++++++++++
+ src/gallium/drivers/nvc0/nvc0_3ddefs.xml.h         |   98 +
+ src/gallium/drivers/nvc0/nvc0_buffer.c             |  489 +++++
+ src/gallium/drivers/nvc0/nvc0_context.c            |  164 ++
+ src/gallium/drivers/nvc0/nvc0_context.h            |  227 +++
+ src/gallium/drivers/nvc0/nvc0_draw.c               |   88 +
+ src/gallium/drivers/nvc0/nvc0_fence.c              |  203 ++
+ src/gallium/drivers/nvc0/nvc0_fence.h              |   48 +
+ src/gallium/drivers/nvc0/nvc0_formats.c            |  462 +++++
+ src/gallium/drivers/nvc0/nvc0_graph_macros.h       |  235 +++
+ src/gallium/drivers/nvc0/nvc0_m2mf.xml.h           |  138 ++
+ src/gallium/drivers/nvc0/nvc0_miptree.c            |  327 ++++
+ src/gallium/drivers/nvc0/nvc0_mm.c                 |  274 +++
+ src/gallium/drivers/nvc0/nvc0_pc.c                 |  693 +++++++
+ src/gallium/drivers/nvc0/nvc0_pc.h                 |  653 +++++++
+ src/gallium/drivers/nvc0/nvc0_pc_emit.c            |  979 ++++++++++
+ src/gallium/drivers/nvc0/nvc0_pc_optimize.c        | 1236 ++++++++++++
+ src/gallium/drivers/nvc0/nvc0_pc_print.c           |  377 ++++
+ src/gallium/drivers/nvc0/nvc0_pc_regalloc.c        |  927 +++++++++
+ src/gallium/drivers/nvc0/nvc0_program.c            |  694 +++++++
+ src/gallium/drivers/nvc0/nvc0_program.h            |   89 +
+ src/gallium/drivers/nvc0/nvc0_push.c               |  289 +++
+ src/gallium/drivers/nvc0/nvc0_push2.c              |  333 ++++
+ src/gallium/drivers/nvc0/nvc0_query.c              |  337 ++++
+ src/gallium/drivers/nvc0/nvc0_resource.c           |   71 +
+ src/gallium/drivers/nvc0/nvc0_resource.h           |  201 ++
+ src/gallium/drivers/nvc0/nvc0_screen.c             |  670 +++++++
+ src/gallium/drivers/nvc0/nvc0_screen.h             |  192 ++
+ src/gallium/drivers/nvc0/nvc0_shader_state.c       |  180 ++
+ src/gallium/drivers/nvc0/nvc0_state.c              |  865 +++++++++
+ src/gallium/drivers/nvc0/nvc0_state_validate.c     |  430 +++++
+ src/gallium/drivers/nvc0/nvc0_stateobj.h           |   82 +
+ src/gallium/drivers/nvc0/nvc0_surface.c            |  377 ++++
+ src/gallium/drivers/nvc0/nvc0_tex.c                |  277 +++
+ src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c         | 2018 ++++++++++++++++++++
+ src/gallium/drivers/nvc0/nvc0_transfer.c           |  381 ++++
+ src/gallium/drivers/nvc0/nvc0_transfer.h           |   38 +
+ src/gallium/drivers/nvc0/nvc0_vbo.c                |  671 +++++++
+ src/gallium/drivers/nvc0/nvc0_winsys.h             |  120 ++
+ src/gallium/drivers/nvfx/nv04_2d.c                 |    2 +-
+ src/gallium/drivers/nvfx/nv30_fragtex.c            |    3 +-
+ src/gallium/drivers/nvfx/nv40_fragtex.c            |    5 +-
+ src/gallium/drivers/nvfx/nvfx_context.c            |    6 +-
+ src/gallium/drivers/nvfx/nvfx_context.h            |   13 +-
+ src/gallium/drivers/nvfx/nvfx_draw.c               |   14 +-
+ src/gallium/drivers/nvfx/nvfx_fragprog.c           |   16 +-
+ src/gallium/drivers/nvfx/nvfx_fragtex.c            |    4 +-
+ src/gallium/drivers/nvfx/nvfx_push.c               |   57 +-
+ src/gallium/drivers/nvfx/nvfx_query.c              |   12 +-
+ src/gallium/drivers/nvfx/nvfx_screen.c             |   70 +-
+ src/gallium/drivers/nvfx/nvfx_state.c              |    2 +-
+ src/gallium/drivers/nvfx/nvfx_state_emit.c         |   68 +-
+ src/gallium/drivers/nvfx/nvfx_state_fb.c           |   39 +-
+ src/gallium/drivers/nvfx/nvfx_surface.c            |    8 +-
+ src/gallium/drivers/nvfx/nvfx_vbo.c                |   39 +-
+ src/gallium/drivers/nvfx/nvfx_vertprog.c           |   14 +-
+ src/gallium/targets/dri-nouveau/Makefile           |    1 +
+ src/gallium/targets/xorg-nouveau/Makefile          |    1 +
+ .../winsys/nouveau/drm/nouveau_drm_winsys.c        |    3 +
+ src/mesa/drivers/dri/nouveau/nouveau_texture.c     |    6 +-
+ 74 files changed, 18237 insertions(+), 206 deletions(-)
+ create mode 100644 src/gallium/drivers/nvc0/Makefile
+ create mode 100644 src/gallium/drivers/nvc0/SConscript
+ create mode 100644 src/gallium/drivers/nvc0/nv50_defs.xml.h
+ create mode 100644 src/gallium/drivers/nvc0/nv50_texture.xml.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_2d.xml.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_3d.xml.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_3ddefs.xml.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_buffer.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_context.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_context.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_draw.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_fence.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_fence.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_formats.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_graph_macros.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_m2mf.xml.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_miptree.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_mm.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_pc.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_pc.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_pc_emit.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_pc_optimize.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_pc_print.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_pc_regalloc.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_program.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_program.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_push.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_push2.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_query.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_resource.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_resource.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_screen.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_screen.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_shader_state.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_state.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_state_validate.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_stateobj.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_surface.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_tex.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_transfer.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_transfer.h
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_vbo.c
+ create mode 100644 src/gallium/drivers/nvc0/nvc0_winsys.h
+
+diff --git a/configure.ac b/configure.ac
+index b451f7c..58fc79f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1686,7 +1686,7 @@ AC_ARG_ENABLE([gallium-nouveau],
+     [enable_gallium_nouveau="$enableval"],
+     [enable_gallium_nouveau=no])
+ if test "x$enable_gallium_nouveau" = xyes; then
+-    GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50"
++    GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
+     gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau"
+ fi
+ 
+diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
+index 8c29027..1f4e517 100644
+--- a/src/gallium/drivers/nouveau/nouveau_screen.h
++++ b/src/gallium/drivers/nouveau/nouveau_screen.h
+@@ -66,7 +66,7 @@ void nouveau_screen_fini(struct nouveau_screen *);
+ 
+ 
+ 
+-
++#ifndef NOUVEAU_NVC0
+ static INLINE unsigned
+ RING_3D(unsigned mthd, unsigned size)
+ {
+@@ -78,5 +78,6 @@ RING_3D_NI(unsigned mthd, unsigned size)
+ {
+ 	return 0x40000000 | (7 << 13) | (size << 18) | mthd;
+ }
++#endif
+ 
+ #endif
+diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
+index ab480ca..8dfb84a 100644
+--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
++++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
+@@ -10,7 +10,9 @@
+ #include "nouveau/nouveau_grobj.h"
+ #include "nouveau/nouveau_notifier.h"
+ #include "nouveau/nouveau_resource.h"
+-#include "nouveau/nouveau_pushbuf.h"
++#ifndef NOUVEAU_NVC0
++#include "nouveau/nv04_pushbuf.h"
++#endif
+ 
+ #ifndef NV04_PFIFO_MAX_PACKET_LEN
+ #define NV04_PFIFO_MAX_PACKET_LEN 2047
+@@ -41,4 +43,7 @@ nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
+ extern struct pipe_screen *
+ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
+ 
++extern struct pipe_screen *
++nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
++
+ #endif
+diff --git a/src/gallium/drivers/nouveau/nv_object.xml.h b/src/gallium/drivers/nouveau/nv_object.xml.h
+index cb7653c..a5b0d04 100644
+--- a/src/gallium/drivers/nouveau/nv_object.xml.h
++++ b/src/gallium/drivers/nouveau/nv_object.xml.h
+@@ -8,12 +8,10 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng
+ git clone git://0x04.net/rules-ng-ng
+ 
+ The rules-ng-ng source files this header was generated from are:
+-- nv30-40_3d.xml (  31709 bytes, from 2010-09-05 07:53:14)
+-- copyright.xml  (   6503 bytes, from 2010-04-10 23:15:50)
+-- nv_3ddefs.xml  (  15193 bytes, from 2010-09-05 07:50:15)
+-- nv_defs.xml    (   4437 bytes, from 2010-08-05 19:38:53)
+-- nv_object.xml  (  10424 bytes, from 2010-08-05 19:38:53)
+-- nvchipsets.xml (   2824 bytes, from 2010-08-05 19:38:53)
++- nv_object.xml  (  11547 bytes, from 2010-10-24 15:29:34)
++- copyright.xml  (   6498 bytes, from 2010-10-03 13:18:37)
++- nvchipsets.xml (   2907 bytes, from 2010-10-15 16:28:21)
++- nv_defs.xml    (   4437 bytes, from 2010-07-06 07:43:58)
+ 
+ Copyright (C) 2006-2010 by the following authors:
+ - Artur Huillet <arthur.huillet at free.fr> (ahuillet)
+@@ -37,7 +35,7 @@ Copyright (C) 2006-2010 by the following authors:
+ - Mark Carey <mark.carey at gmail.com> (careym)
+ - Matthieu Castet <matthieu.castet at parrot.com> (mat-c)
+ - nvidiaman <nvidiaman at users.sf.net> (nvidiaman)
+-- Patrice Mandin <mandin.patrice at orange.fr> (pmandin, pmdata)
++- Patrice Mandin <patmandin at gmail.com> (pmandin, pmdata)
+ - Pekka Paalanen <pq at iki.fi> (pq, ppaalanen)
+ - Peter Popov <ironpeter at users.sf.net> (ironpeter)
+ - Richard Hughes <hughsient at users.sf.net> (hughsient)
+@@ -180,6 +178,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #define NV50_COMPUTE						0x000050c0
+ #define NVA3_COMPUTE						0x000085c0
+ #define NVC0_COMPUTE						0x000090c0
++#define NV84_CRYPT						0x000074c1
+ #define NV01_SUBCHAN__SIZE					0x00002000
+ #define NV01_SUBCHAN						0x00000000
+ 
+@@ -194,9 +193,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ 
+ #define NV84_SUBCHAN_QUERY_GET					0x0000001c
+ 
+-#define NV84_SUBCHAN_UNK20					0x00000020
++#define NV84_SUBCHAN_QUERY_INTR					0x00000020
+ 
+-#define NV84_SUBCHAN_UNK24					0x00000024
++#define NV84_SUBCHAN_WRCACHE_FLUSH				0x00000024
+ 
+ #define NV10_SUBCHAN_REF_CNT					0x00000050
+ 
+@@ -209,7 +208,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ 
+ #define NV11_SUBCHAN_SEMAPHORE_RELEASE				0x0000006c
+ 
+-#define NV50_SUBCHAN_UNK80					0x00000080
++#define NV40_SUBCHAN_YIELD					0x00000080
+ 
+ #define NV01_GRAPH						0x00000000
+ 
+@@ -227,5 +226,43 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ 
+ #define NV40_GRAPH_PM_TRIGGER					0x00000140
+ 
++#define NVC0_SUBCHAN__SIZE					0x00008000
++#define NVC0_SUBCHAN						0x00000000
++
++#define NVC0_SUBCHAN_OBJECT					0x00000000
++
++
++#define NVC0_SUBCHAN_QUERY_ADDRESS_HIGH				0x00000010
++
++#define NVC0_SUBCHAN_QUERY_ADDRESS_LOW				0x00000014
++
++#define NVC0_SUBCHAN_QUERY_SEQUENCE				0x00000018
++
++#define NVC0_SUBCHAN_QUERY_GET					0x0000001c
++
++#define NVC0_SUBCHAN_REF_CNT					0x00000050
++
++#define NVC0_GRAPH						0x00000000
++
++#define NVC0_GRAPH_NOP						0x00000100
++
++#define NVC0_GRAPH_NOTIFY_ADDRESS_HIGH				0x00000104
++
++#define NVC0_GRAPH_NOTIFY_ADDRESS_LOW				0x00000108
++
++#define NVC0_GRAPH_NOTIFY					0x0000010c
++#define NVC0_GRAPH_NOTIFY_WRITE					0x00000000
++#define NVC0_GRAPH_NOTIFY_WRITE_AND_AWAKEN			0x00000001
++
++#define NVC0_GRAPH_SERIALIZE					0x00000110
++
++#define NVC0_GRAPH_MACRO_UPLOAD_POS				0x00000114
++
++#define NVC0_GRAPH_MACRO_UPLOAD_DATA				0x00000118
++
++#define NVC0_GRAPH_MACRO_ID					0x0000011c
++
++#define NVC0_GRAPH_MACRO_POS					0x00000120
++
+ 
+ #endif /* NV_OBJECT_XML */
+diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
+index 0874cb5..4f97616 100644
+--- a/src/gallium/drivers/nv50/nv50_context.c
++++ b/src/gallium/drivers/nv50/nv50_context.c
+@@ -49,6 +49,10 @@ nv50_destroy(struct pipe_context *pipe)
+ 	struct nv50_context *nv50 = nv50_context(pipe);
+ 	int i;
+ 
++        for (i = 0; i < nv50->vtxbuf_nr; i++) {
++           pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
++        }
++
+ 	for (i = 0; i < 64; i++) {
+ 		if (!nv50->state.hw[i])
+ 			continue;
+diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
+index 306aa81..1c1b66d 100644
+--- a/src/gallium/drivers/nv50/nv50_shader_state.c
++++ b/src/gallium/drivers/nv50/nv50_shader_state.c
+@@ -71,7 +71,7 @@ nv50_transfer_constbuf(struct nv50_context *nv50,
+       map += nr;
+    }
+ 
+-   pipe_buffer_unmap(pipe, buf, transfer);
++   pipe_buffer_unmap(pipe, transfer);
+ }
+ 
+ static void
+diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
+index f42fa2d..b4eda0f 100644
+--- a/src/gallium/drivers/nv50/nv50_state.c
++++ b/src/gallium/drivers/nv50/nv50_state.c
+@@ -721,17 +721,16 @@ nv50_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
+ 	struct nv50_context *nv50 = nv50_context(pipe);
+ 
+ 	if (shader == PIPE_SHADER_VERTEX) {
+-		nv50->constbuf[PIPE_SHADER_VERTEX] = buf;
+ 		nv50->dirty |= NV50_NEW_VERTPROG_CB;
+ 	} else
+ 	if (shader == PIPE_SHADER_FRAGMENT) {
+-		nv50->constbuf[PIPE_SHADER_FRAGMENT] = buf;
+ 		nv50->dirty |= NV50_NEW_FRAGPROG_CB;
+-	} else
+-	if (shader == PIPE_SHADER_GEOMETRY) {
+-		nv50->constbuf[PIPE_SHADER_GEOMETRY] = buf;
++	} else {
++		assert(shader == PIPE_SHADER_GEOMETRY);
+ 		nv50->dirty |= NV50_NEW_GEOMPROG_CB;
+ 	}
++
++	pipe_resource_reference(&nv50->constbuf[shader], buf);
+ }
+ 
+ static void
+@@ -780,8 +779,9 @@ nv50_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
+ {
+ 	struct nv50_context *nv50 = nv50_context(pipe);
+ 
+-	memcpy(nv50->vtxbuf, vb, sizeof(*vb) * count);
+-	nv50->vtxbuf_nr = count;
++        util_copy_vertex_buffers(nv50->vtxbuf,
++                                 &nv50->vtxbuf_nr,
++                                 vb, count);
+ 
+ 	nv50->dirty |= NV50_NEW_ARRAYS;
+ }
+diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
+index ce48022..a99df76 100644
+--- a/src/gallium/drivers/nv50/nv50_surface.c
++++ b/src/gallium/drivers/nv50/nv50_surface.c
+@@ -22,7 +22,7 @@
+ 
+ #define __NOUVEAU_PUSH_H__
+ #include <stdint.h>
+-#include "nouveau/nouveau_pushbuf.h"
++#include "nouveau/nv04_pushbuf.h"
+ #include "nv50_context.h"
+ #include "nv50_resource.h"
+ #include "pipe/p_defines.h"
+diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
+index d41a59d..53f319a 100644
+--- a/src/gallium/drivers/nv50/nv50_vbo.c
++++ b/src/gallium/drivers/nv50/nv50_vbo.c
+@@ -284,7 +284,7 @@ nv50_draw_elements_inline(struct pipe_context *pipe,
+ 		nzi = TRUE;
+ 	}
+ 
+-	pipe_buffer_unmap(pipe, indexBuffer, transfer);
++	pipe_buffer_unmap(pipe, transfer);
+ }
+ 
+ static void
+diff --git a/src/gallium/drivers/nvc0/Makefile b/src/gallium/drivers/nvc0/Makefile
+new file mode 100644
+index 0000000..da8f9a2
+--- /dev/null
++++ b/src/gallium/drivers/nvc0/Makefile
+@@ -0,0 +1,34 @@
++TOP = ../../../..
++include $(TOP)/configs/current
++
++LIBNAME = nvc0
++
++C_SOURCES = \
++	nvc0_buffer.c \
++	nvc0_context.c \
++	nvc0_draw.c \
++	nvc0_formats.c \
++	nvc0_miptree.c \
++	nvc0_resource.c \
++	nvc0_screen.c \
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/Mesa/Mesa.spec?r1=1.271&r2=1.272&f=u



More information about the pld-cvs-commit mailing list