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

« back to all changes in this revision

Viewing changes to src/mesa/state_tracker/st_program.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:
35
35
#define ST_PROGRAM_H
36
36
 
37
37
#include "main/mtypes.h"
38
 
#include "shader/program.h"
39
 
#include "pipe/p_shader_tokens.h"
40
 
 
41
 
 
42
 
struct cso_fragment_shader;
43
 
struct cso_vertex_shader;
44
 
struct translated_vertex_program;
 
38
#include "program/program.h"
 
39
#include "pipe/p_state.h"
 
40
#include "st_context.h"
45
41
 
46
42
 
47
43
/**
99
95
};
100
96
 
101
97
 
102
 
 
103
 
 
104
98
/**
105
99
 * Derived from Mesa gl_fragment_program:
106
100
 */
126
120
   struct st_vp_varient *varients;
127
121
};
128
122
 
 
123
/**
 
124
 * Derived from Mesa gl_geometry_program:
 
125
 */
 
126
struct st_geometry_program
 
127
{
 
128
   struct gl_geometry_program Base;  /**< The Mesa geometry program */
 
129
   GLuint serialNo;
 
130
 
 
131
   /** map GP input back to VP output */
 
132
   GLuint input_map[PIPE_MAX_SHADER_INPUTS];
 
133
 
 
134
   /** maps a Mesa GEOM_ATTRIB_x to a packed TGSI input index */
 
135
   GLuint input_to_index[GEOM_ATTRIB_MAX];
 
136
   /** maps a TGSI input index back to a Mesa GEOM_ATTRIB_x */
 
137
   GLuint index_to_input[PIPE_MAX_SHADER_INPUTS];
 
138
 
 
139
   GLuint num_inputs;
 
140
 
 
141
   GLuint input_to_slot[GEOM_ATTRIB_MAX];  /**< Maps GEOM_ATTRIB_x to slot */
 
142
   GLuint num_input_slots;
 
143
 
 
144
   ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS];
 
145
   ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
 
146
 
 
147
   struct pipe_shader_state tgsi;
 
148
   void *driver_shader;
 
149
};
129
150
 
130
151
static INLINE struct st_fragment_program *
131
152
st_fragment_program( struct gl_fragment_program *fp )
140
161
   return (struct st_vertex_program *)vp;
141
162
}
142
163
 
 
164
static INLINE struct st_geometry_program *
 
165
st_geometry_program( struct gl_geometry_program *vp )
 
166
{
 
167
   return (struct st_geometry_program *)vp;
 
168
}
143
169
 
144
170
static INLINE void
145
171
st_reference_vertprog(struct st_context *st,
152
178
}
153
179
 
154
180
static INLINE void
 
181
st_reference_geomprog(struct st_context *st,
 
182
                      struct st_geometry_program **ptr,
 
183
                      struct st_geometry_program *prog)
 
184
{
 
185
   _mesa_reference_program(st->ctx,
 
186
                           (struct gl_program **) ptr,
 
187
                           (struct gl_program *) prog);
 
188
}
 
189
 
 
190
static INLINE void
155
191
st_reference_fragprog(struct st_context *st,
156
192
                      struct st_fragment_program **ptr,
157
193
                      struct st_fragment_program *prog)
166
202
st_translate_fragment_program(struct st_context *st,
167
203
                              struct st_fragment_program *fp);
168
204
 
 
205
extern void
 
206
st_translate_geometry_program(struct st_context *st,
 
207
                              struct st_geometry_program *stgp);
169
208
 
170
209
/* Called after program string change, discard all previous
171
210
 * compilation results.