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

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/nouveau/nv10_state_tex.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:
32
32
#include "nouveau_util.h"
33
33
#include "nv10_driver.h"
34
34
 
 
35
#define TX_GEN_MODE(i, j) (NV10TCL_TX_GEN_MODE_S(i) + 4 * (j))
 
36
#define TX_GEN_COEFF(i, j) (NV10TCL_TX_GEN_COEFF_S_A(i) + 16 * (j))
 
37
#define TX_MATRIX(i) (NV10TCL_TX0_MATRIX(0) + 64 * (i))
 
38
 
35
39
void
36
40
nv10_emit_tex_gen(GLcontext *ctx, int emit)
37
41
{
 
42
        const int i = emit - NOUVEAU_STATE_TEX_GEN0;
 
43
        struct nouveau_context *nctx = to_nouveau_context(ctx);
 
44
        struct nouveau_channel *chan = context_chan(ctx);
 
45
        struct nouveau_grobj *celsius = context_eng3d(ctx);
 
46
        struct gl_texture_unit *unit = &ctx->Texture.Unit[i];
 
47
        int j;
 
48
 
 
49
        for (j = 0; j < 4; j++) {
 
50
                if (nctx->fallback == HWTNL && (unit->TexGenEnabled & 1 << j)) {
 
51
                        struct gl_texgen *coord = get_texgen_coord(unit, j);
 
52
                        float *k = get_texgen_coeff(coord);
 
53
 
 
54
                        if (k) {
 
55
                                BEGIN_RING(chan, celsius,
 
56
                                           TX_GEN_COEFF(i, j), 4);
 
57
                                OUT_RINGp(chan, k, 4);
 
58
                        }
 
59
 
 
60
                        BEGIN_RING(chan, celsius, TX_GEN_MODE(i, j), 1);
 
61
                        OUT_RING(chan, nvgl_texgen_mode(coord->Mode));
 
62
 
 
63
                } else {
 
64
                        BEGIN_RING(chan, celsius, TX_GEN_MODE(i, j), 1);
 
65
                        OUT_RING(chan, 0);
 
66
                }
 
67
        }
 
68
 
 
69
        context_dirty_i(ctx, TEX_MAT, i);
 
70
}
 
71
 
 
72
void
 
73
nv10_emit_tex_mat(GLcontext *ctx, int emit)
 
74
{
 
75
        const int i = emit - NOUVEAU_STATE_TEX_MAT0;
 
76
        struct nouveau_context *nctx = to_nouveau_context(ctx);
 
77
        struct nouveau_channel *chan = context_chan(ctx);
 
78
        struct nouveau_grobj *celsius = context_eng3d(ctx);
 
79
 
 
80
        if (nctx->fallback == HWTNL &&
 
81
            ((ctx->Texture._TexMatEnabled & 1 << i) ||
 
82
             ctx->Texture.Unit[i]._GenFlags)) {
 
83
                BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(i), 1);
 
84
                OUT_RING(chan, 1);
 
85
 
 
86
                BEGIN_RING(chan, celsius, TX_MATRIX(i), 16);
 
87
                OUT_RINGm(chan, ctx->TextureMatrixStack[i].Top->m);
 
88
 
 
89
        } else {
 
90
                BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(i), 1);
 
91
                OUT_RING(chan, 0);
 
92
        }
38
93
}
39
94
 
40
95
static uint32_t