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

« back to all changes in this revision

Viewing changes to src/gallium/drivers/nvfx/nvfx_state.h

  • 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
#ifndef __NVFX_STATE_H__
 
2
#define __NVFX_STATE_H__
 
3
 
 
4
#include "pipe/p_state.h"
 
5
#include "tgsi/tgsi_scan.h"
 
6
#include "nouveau/nouveau_statebuf.h"
 
7
#include "util/u_dynarray.h"
 
8
#include "util/u_linkage.h"
 
9
 
 
10
struct nvfx_vertex_program_exec {
 
11
        uint32_t data[4];
 
12
};
 
13
 
 
14
struct nvfx_vertex_program_data {
 
15
        int index; /* immediates == -1 */
 
16
        float value[4];
 
17
};
 
18
 
 
19
struct nvfx_vertex_program {
 
20
        unsigned long long id;
 
21
 
 
22
        struct nvfx_vertex_program_exec *insns;
 
23
        unsigned nr_insns;
 
24
        struct nvfx_vertex_program_data *consts;
 
25
        unsigned nr_consts;
 
26
 
 
27
        char generic_to_fp_input[256];
 
28
        int sprite_fp_input;
 
29
 
 
30
        struct nouveau_resource *exec;
 
31
        unsigned exec_start;
 
32
        struct nouveau_resource *data;
 
33
        unsigned data_start;
 
34
        unsigned data_start_min;
 
35
 
 
36
        uint32_t ir;
 
37
        uint32_t or;
 
38
        int clip_nr;
 
39
 
 
40
        struct util_dynarray branch_relocs;
 
41
        struct util_dynarray const_relocs;
 
42
};
 
43
 
 
44
#define NVFX_VP_FAILED ((struct nvfx_vertex_program*)-1)
 
45
 
 
46
struct nvfx_pipe_vertex_program {
 
47
        struct pipe_shader_state pipe;
 
48
        struct tgsi_shader_info info;
 
49
 
 
50
        unsigned draw_elements;
 
51
        boolean draw_no_elements;
 
52
        struct draw_vertex_shader *draw_vs;
 
53
        struct nvfx_vertex_program* draw_vp;
 
54
 
 
55
        struct nvfx_vertex_program* vp;
 
56
};
 
57
 
 
58
struct nvfx_fragment_program_data {
 
59
        unsigned offset;
 
60
        unsigned index;
 
61
};
 
62
 
 
63
struct nvfx_fragment_program_bo {
 
64
        struct nvfx_fragment_program_bo* next;
 
65
        struct nouveau_bo* bo;
 
66
        unsigned char* slots;
 
67
        char insn[] __attribute__((aligned(16)));
 
68
};
 
69
 
 
70
struct nvfx_fragment_program {
 
71
        unsigned samplers;
 
72
        unsigned point_sprite_control;
 
73
        unsigned or;
 
74
        unsigned coord_conventions;
 
75
 
 
76
        uint32_t *insn;
 
77
        int       insn_len;
 
78
 
 
79
        struct nvfx_fragment_program_data *consts;
 
80
        unsigned nr_consts;
 
81
 
 
82
        /* the slot at num_slots is for the sprite coordinate, if any */
 
83
        unsigned num_slots; /* how many input semantics? */
 
84
        unsigned char slot_to_generic[10]; /* semantics */
 
85
        unsigned char slot_to_fp_input[11]; /* current assignment of slots for each used semantic */
 
86
        struct util_dynarray slot_relocations[11];
 
87
 
 
88
        /* This is reset to progs on any relocation update, and decreases every time we
 
89
         * move to a new prog due to a constant update
 
90
         * When this is the same as progs, applying relocations is no longer necessary.
 
91
         */
 
92
        unsigned progs_left_with_obsolete_slot_assignments;
 
93
 
 
94
        unsigned long long last_vp_id;
 
95
        unsigned last_sprite_coord_enable;
 
96
 
 
97
        uint32_t fp_control;
 
98
 
 
99
        unsigned bo_prog_idx;
 
100
        unsigned prog_size;
 
101
        unsigned progs_per_bo;
 
102
        unsigned progs;
 
103
 
 
104
        struct nvfx_fragment_program_bo* fpbo;
 
105
};
 
106
 
 
107
struct nvfx_pipe_fragment_program {
 
108
        struct pipe_shader_state pipe;
 
109
        struct tgsi_shader_info info;
 
110
 
 
111
        struct nvfx_fragment_program* fps[2];
 
112
};
 
113
 
 
114
#endif