~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/gallium/drivers/nv30/nv30_context.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "draw/draw_context.h"
2
 
#include "pipe/p_defines.h"
3
 
 
4
 
#include "nv30_context.h"
5
 
#include "nv30_screen.h"
6
 
 
7
 
static void
8
 
nv30_flush(struct pipe_context *pipe, unsigned flags,
9
 
           struct pipe_fence_handle **fence)
10
 
{
11
 
        struct nv30_context *nv30 = nv30_context(pipe);
12
 
        struct nv30_screen *screen = nv30->screen;
13
 
        struct nouveau_channel *chan = screen->base.channel;
14
 
        struct nouveau_grobj *rankine = screen->rankine;
15
 
 
16
 
        if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
17
 
                BEGIN_RING(chan, rankine, 0x1fd8, 1);
18
 
                OUT_RING  (chan, 2);
19
 
                BEGIN_RING(chan, rankine, 0x1fd8, 1);
20
 
                OUT_RING  (chan, 1);
21
 
        }
22
 
 
23
 
        FIRE_RING(chan);
24
 
        if (fence)
25
 
                *fence = NULL;
26
 
}
27
 
 
28
 
static void
29
 
nv30_destroy(struct pipe_context *pipe)
30
 
{
31
 
        struct nv30_context *nv30 = nv30_context(pipe);
32
 
        unsigned i;
33
 
 
34
 
        for (i = 0; i < NV30_STATE_MAX; i++) {
35
 
                if (nv30->state.hw[i])
36
 
                        so_ref(NULL, &nv30->state.hw[i]);
37
 
        }
38
 
 
39
 
        if (nv30->draw)
40
 
                draw_destroy(nv30->draw);
41
 
        FREE(nv30);
42
 
}
43
 
 
44
 
struct pipe_context *
45
 
nv30_create(struct pipe_screen *pscreen, void *priv)
46
 
{
47
 
        struct nv30_screen *screen = nv30_screen(pscreen);
48
 
        struct pipe_winsys *ws = pscreen->winsys;
49
 
        struct nv30_context *nv30;
50
 
        struct nouveau_winsys *nvws = screen->nvws;
51
 
 
52
 
        nv30 = CALLOC(1, sizeof(struct nv30_context));
53
 
        if (!nv30)
54
 
                return NULL;
55
 
        nv30->screen = screen;
56
 
 
57
 
        nv30->nvws = nvws;
58
 
 
59
 
        nv30->pipe.winsys = ws;
60
 
        nv30->pipe.screen = pscreen;
61
 
        nv30->pipe.priv = priv;
62
 
        nv30->pipe.destroy = nv30_destroy;
63
 
        nv30->pipe.draw_arrays = nv30_draw_arrays;
64
 
        nv30->pipe.draw_elements = nv30_draw_elements;
65
 
        nv30->pipe.clear = nv30_clear;
66
 
        nv30->pipe.flush = nv30_flush;
67
 
 
68
 
        nv30->pipe.is_texture_referenced = nouveau_is_texture_referenced;
69
 
        nv30->pipe.is_buffer_referenced = nouveau_is_buffer_referenced;
70
 
 
71
 
        screen->base.channel->user_private = nv30;
72
 
        screen->base.channel->flush_notify = nv30_state_flush_notify;
73
 
 
74
 
        nv30_init_query_functions(nv30);
75
 
        nv30_init_surface_functions(nv30);
76
 
        nv30_init_state_functions(nv30);
77
 
 
78
 
        /* Create, configure, and install fallback swtnl path */
79
 
        nv30->draw = draw_create(&nv30->pipe);
80
 
        draw_wide_point_threshold(nv30->draw, 9999999.0);
81
 
        draw_wide_line_threshold(nv30->draw, 9999999.0);
82
 
        draw_enable_line_stipple(nv30->draw, FALSE);
83
 
        draw_enable_point_sprites(nv30->draw, FALSE);
84
 
        draw_set_rasterize_stage(nv30->draw, nv30_draw_render_stage(nv30));
85
 
 
86
 
        return &nv30->pipe;
87
 
}