]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa-nouveau-revert.patch
- nouveau updates wrt libdrm 2.4.24
[packages/Mesa.git] / Mesa-nouveau-revert.patch
1 From 20f77c532547c7f8f1cb26f41357037821cf2a9f Mon Sep 17 00:00:00 2001
2 From: Ben Skeggs <bskeggs@redhat.com>
3 Date: Mon, 17 Jan 2011 12:47:12 +1000
4 Subject: [PATCH 2/3] mesa-7.10-nouveau-revert.patch
5
6 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7 ---
8  src/gallium/drivers/nv50/nv50_context.c      |    4 ----
9  src/gallium/drivers/nv50/nv50_shader_state.c |    2 +-
10  src/gallium/drivers/nv50/nv50_state.c        |    5 ++---
11  src/gallium/drivers/nv50/nv50_vbo.c          |    2 +-
12  src/gallium/drivers/nvc0/nvc0_screen.c       |    2 +-
13  src/gallium/drivers/nvfx/nvfx_vbo.c          |   14 +++++++++++---
14  6 files changed, 16 insertions(+), 13 deletions(-)
15
16 diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
17 index 4f97616..0874cb5 100644
18 --- a/src/gallium/drivers/nv50/nv50_context.c
19 +++ b/src/gallium/drivers/nv50/nv50_context.c
20 @@ -49,10 +49,6 @@ nv50_destroy(struct pipe_context *pipe)
21         struct nv50_context *nv50 = nv50_context(pipe);
22         int i;
23  
24 -        for (i = 0; i < nv50->vtxbuf_nr; i++) {
25 -           pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
26 -        }
27 -
28         for (i = 0; i < 64; i++) {
29                 if (!nv50->state.hw[i])
30                         continue;
31 diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
32 index 1c1b66d..306aa81 100644
33 --- a/src/gallium/drivers/nv50/nv50_shader_state.c
34 +++ b/src/gallium/drivers/nv50/nv50_shader_state.c
35 @@ -71,7 +71,7 @@ nv50_transfer_constbuf(struct nv50_context *nv50,
36        map += nr;
37     }
38  
39 -   pipe_buffer_unmap(pipe, transfer);
40 +   pipe_buffer_unmap(pipe, buf, transfer);
41  }
42  
43  static void
44 diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
45 index b4eda0f..04291e4 100644
46 --- a/src/gallium/drivers/nv50/nv50_state.c
47 +++ b/src/gallium/drivers/nv50/nv50_state.c
48 @@ -779,9 +779,8 @@ nv50_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
49  {
50         struct nv50_context *nv50 = nv50_context(pipe);
51  
52 -        util_copy_vertex_buffers(nv50->vtxbuf,
53 -                                 &nv50->vtxbuf_nr,
54 -                                 vb, count);
55 +       memcpy(nv50->vtxbuf, vb, sizeof(*vb) * count);
56 +       nv50->vtxbuf_nr = count;
57  
58         nv50->dirty |= NV50_NEW_ARRAYS;
59  }
60 diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
61 index 53f319a..d41a59d 100644
62 --- a/src/gallium/drivers/nv50/nv50_vbo.c
63 +++ b/src/gallium/drivers/nv50/nv50_vbo.c
64 @@ -284,7 +284,7 @@ nv50_draw_elements_inline(struct pipe_context *pipe,
65                 nzi = TRUE;
66         }
67  
68 -       pipe_buffer_unmap(pipe, transfer);
69 +       pipe_buffer_unmap(pipe, indexBuffer, transfer);
70  }
71  
72  static void
73 diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
74 index f608b32..e14d4fd 100644
75 --- a/src/gallium/drivers/nvc0/nvc0_screen.c
76 +++ b/src/gallium/drivers/nvc0/nvc0_screen.c
77 @@ -110,7 +110,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
78     case PIPE_CAP_SHADER_STENCIL_EXPORT:
79        return 0;
80     case PIPE_CAP_PRIMITIVE_RESTART:
81 -   case PIPE_CAP_INSTANCED_DRAWING:
82 +//   case PIPE_CAP_INSTANCED_DRAWING:
83        return 1;
84     default:
85        NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
86 diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
87 index 01dacb4..1c88f5f 100644
88 --- a/src/gallium/drivers/nvfx/nvfx_vbo.c
89 +++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
90 @@ -591,10 +591,18 @@ nvfx_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
91  {
92         struct nvfx_context *nvfx = nvfx_context(pipe);
93  
94 -        util_copy_vertex_buffers(nvfx->vtxbuf,
95 -                                 &nvfx->vtxbuf_nr,
96 -                                 vb, count);
97 +       for(unsigned i = 0; i < count; ++i)
98 +       {
99 +               pipe_resource_reference(&nvfx->vtxbuf[i].buffer, vb[i].buffer);
100 +               nvfx->vtxbuf[i].buffer_offset = vb[i].buffer_offset;
101 +               nvfx->vtxbuf[i].max_index = vb[i].max_index;
102 +               nvfx->vtxbuf[i].stride = vb[i].stride;
103 +       }
104 +
105 +       for(unsigned i = count; i < nvfx->vtxbuf_nr; ++i)
106 +               pipe_resource_reference(&nvfx->vtxbuf[i].buffer, 0);
107  
108 +       nvfx->vtxbuf_nr = count;
109         nvfx->use_vertex_buffers = -1;
110         nvfx->draw_dirty |= NVFX_NEW_ARRAYS;
111  }
112 -- 
113 1.7.3.4
114
This page took 0.03744 seconds and 3 git commands to generate.