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

« back to all changes in this revision

Viewing changes to src/glx/indirect_vertex_array.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:
84
84
                                           *arrays, GLenum key,
85
85
                                           unsigned index);
86
86
static void fill_array_info_cache(struct array_state_vector *arrays);
87
 
static GLboolean validate_mode(__GLXcontext * gc, GLenum mode);
88
 
static GLboolean validate_count(__GLXcontext * gc, GLsizei count);
89
 
static GLboolean validate_type(__GLXcontext * gc, GLenum type);
 
87
static GLboolean validate_mode(struct glx_context * gc, GLenum mode);
 
88
static GLboolean validate_count(struct glx_context * gc, GLsizei count);
 
89
static GLboolean validate_type(struct glx_context * gc, GLenum type);
90
90
 
91
91
 
92
92
/**
109
109
 * __glXInitVertexArrayState().
110
110
 */
111
111
void
112
 
__glXFreeVertexArrayState(__GLXcontext * gc)
 
112
__glXFreeVertexArrayState(struct glx_context * gc)
113
113
{
114
114
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
115
115
   struct array_state_vector *arrays = state->array_state;
135
135
 * \param gc  GLX context whose vertex array state is to be initialized.
136
136
 *
137
137
 * \warning
138
 
 * This function may only be called after __GLXcontext::gl_extension_bits,
139
 
 * __GLXcontext::server_minor, and __GLXcontext::server_major have been
 
138
 * This function may only be called after struct glx_context::gl_extension_bits,
 
139
 * struct glx_context::server_minor, and __GLXcontext::server_major have been
140
140
 * initialized.  These values are used to determine what vertex arrays are
141
141
 * supported.
142
142
 *
144
144
 * Return values from malloc are not properly tested.
145
145
 */
146
146
void
147
 
__glXInitVertexArrayState(__GLXcontext * gc)
 
147
__glXInitVertexArrayState(struct glx_context * gc)
148
148
{
149
149
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
150
150
   struct array_state_vector *arrays;
487
487
void
488
488
emit_DrawArrays_none(GLenum mode, GLint first, GLsizei count)
489
489
{
490
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
490
   struct glx_context *gc = __glXGetCurrentContext();
491
491
   const __GLXattribute *state =
492
492
      (const __GLXattribute *) (gc->client_state_private);
493
493
   struct array_state_vector *arrays = state->array_state;
549
549
 * A pointer to the buffer for array data.
550
550
 */
551
551
static GLubyte *
552
 
emit_DrawArrays_header_old(__GLXcontext * gc,
 
552
emit_DrawArrays_header_old(struct glx_context * gc,
553
553
                           struct array_state_vector *arrays,
554
554
                           size_t * elements_per_request,
555
555
                           unsigned int *total_requests,
658
658
void
659
659
emit_DrawArrays_old(GLenum mode, GLint first, GLsizei count)
660
660
{
661
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
661
   struct glx_context *gc = __glXGetCurrentContext();
662
662
   const __GLXattribute *state =
663
663
      (const __GLXattribute *) (gc->client_state_private);
664
664
   struct array_state_vector *arrays = state->array_state;
720
720
emit_DrawElements_none(GLenum mode, GLsizei count, GLenum type,
721
721
                       const GLvoid * indices)
722
722
{
723
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
723
   struct glx_context *gc = __glXGetCurrentContext();
724
724
   const __GLXattribute *state =
725
725
      (const __GLXattribute *) (gc->client_state_private);
726
726
   struct array_state_vector *arrays = state->array_state;
787
787
emit_DrawElements_old(GLenum mode, GLsizei count, GLenum type,
788
788
                      const GLvoid * indices)
789
789
{
790
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
790
   struct glx_context *gc = __glXGetCurrentContext();
791
791
   const __GLXattribute *state =
792
792
      (const __GLXattribute *) (gc->client_state_private);
793
793
   struct array_state_vector *arrays = state->array_state;
875
875
 * \c GL_TRUE if the argument is valid, \c GL_FALSE if is not.
876
876
 */
877
877
static GLboolean
878
 
validate_mode(__GLXcontext * gc, GLenum mode)
 
878
validate_mode(struct glx_context * gc, GLenum mode)
879
879
{
880
880
   switch (mode) {
881
881
   case GL_POINTS:
908
908
 * \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not.
909
909
 */
910
910
static GLboolean
911
 
validate_count(__GLXcontext * gc, GLsizei count)
 
911
validate_count(struct glx_context * gc, GLsizei count)
912
912
{
913
913
   if (count < 0) {
914
914
      __glXSetError(gc, GL_INVALID_VALUE);
927
927
 * \c GL_TRUE if the argument is valid, \c GL_FALSE if it is not.
928
928
 */
929
929
static GLboolean
930
 
validate_type(__GLXcontext * gc, GLenum type)
 
930
validate_type(struct glx_context * gc, GLenum type)
931
931
{
932
932
   switch (type) {
933
933
   case GL_UNSIGNED_INT:
944
944
void
945
945
__indirect_glDrawArrays(GLenum mode, GLint first, GLsizei count)
946
946
{
947
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
947
   struct glx_context *gc = __glXGetCurrentContext();
948
948
   const __GLXattribute *state =
949
949
      (const __GLXattribute *) (gc->client_state_private);
950
950
   struct array_state_vector *arrays = state->array_state;
963
963
void
964
964
__indirect_glArrayElement(GLint index)
965
965
{
966
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
966
   struct glx_context *gc = __glXGetCurrentContext();
967
967
   const __GLXattribute *state =
968
968
      (const __GLXattribute *) (gc->client_state_private);
969
969
   struct array_state_vector *arrays = state->array_state;
989
989
__indirect_glDrawElements(GLenum mode, GLsizei count, GLenum type,
990
990
                          const GLvoid * indices)
991
991
{
992
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
992
   struct glx_context *gc = __glXGetCurrentContext();
993
993
   const __GLXattribute *state =
994
994
      (const __GLXattribute *) (gc->client_state_private);
995
995
   struct array_state_vector *arrays = state->array_state;
1011
1011
                               GLsizei count, GLenum type,
1012
1012
                               const GLvoid * indices)
1013
1013
{
1014
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1014
   struct glx_context *gc = __glXGetCurrentContext();
1015
1015
   const __GLXattribute *state =
1016
1016
      (const __GLXattribute *) (gc->client_state_private);
1017
1017
   struct array_state_vector *arrays = state->array_state;
1037
1037
__indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count,
1038
1038
                                GLsizei primcount)
1039
1039
{
1040
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1040
   struct glx_context *gc = __glXGetCurrentContext();
1041
1041
   const __GLXattribute *state =
1042
1042
      (const __GLXattribute *) (gc->client_state_private);
1043
1043
   struct array_state_vector *arrays = state->array_state;
1063
1063
                                  GLenum type, const GLvoid ** indices,
1064
1064
                                  GLsizei primcount)
1065
1065
{
1066
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1066
   struct glx_context *gc = __glXGetCurrentContext();
1067
1067
   const __GLXattribute *state =
1068
1068
      (const __GLXattribute *) (gc->client_state_private);
1069
1069
   struct array_state_vector *arrays = state->array_state;
1119
1119
      0, 0, X_GLrop_Vertex2dv, X_GLrop_Vertex3dv, X_GLrop_Vertex4dv
1120
1120
   };
1121
1121
   uint16_t opcode;
1122
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1122
   struct glx_context *gc = __glXGetCurrentContext();
1123
1123
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1124
1124
   struct array_state_vector *arrays = state->array_state;
1125
1125
   struct array_state *a;
1164
1164
                           const GLvoid * pointer)
1165
1165
{
1166
1166
   uint16_t opcode;
1167
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1167
   struct glx_context *gc = __glXGetCurrentContext();
1168
1168
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1169
1169
   struct array_state_vector *arrays = state->array_state;
1170
1170
   struct array_state *a;
1235
1235
      0, 0, 0, X_GLrop_Color3dv, X_GLrop_Color4dv
1236
1236
   };
1237
1237
   uint16_t opcode;
1238
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1238
   struct glx_context *gc = __glXGetCurrentContext();
1239
1239
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1240
1240
   struct array_state_vector *arrays = state->array_state;
1241
1241
   struct array_state *a;
1290
1290
__indirect_glIndexPointer(GLenum type, GLsizei stride, const GLvoid * pointer)
1291
1291
{
1292
1292
   uint16_t opcode;
1293
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1293
   struct glx_context *gc = __glXGetCurrentContext();
1294
1294
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1295
1295
   struct array_state_vector *arrays = state->array_state;
1296
1296
   struct array_state *a;
1335
1335
void
1336
1336
__indirect_glEdgeFlagPointer(GLsizei stride, const GLvoid * pointer)
1337
1337
{
1338
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1338
   struct glx_context *gc = __glXGetCurrentContext();
1339
1339
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1340
1340
   struct array_state_vector *arrays = state->array_state;
1341
1341
   struct array_state *a;
1397
1397
   };
1398
1398
 
1399
1399
   uint16_t opcode;
1400
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1400
   struct glx_context *gc = __glXGetCurrentContext();
1401
1401
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1402
1402
   struct array_state_vector *arrays = state->array_state;
1403
1403
   struct array_state *a;
1470
1470
                                      const GLvoid * pointer)
1471
1471
{
1472
1472
   uint16_t opcode;
1473
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1473
   struct glx_context *gc = __glXGetCurrentContext();
1474
1474
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1475
1475
   struct array_state_vector *arrays = state->array_state;
1476
1476
   struct array_state *a;
1530
1530
                                const GLvoid * pointer)
1531
1531
{
1532
1532
   uint16_t opcode;
1533
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1533
   struct glx_context *gc = __glXGetCurrentContext();
1534
1534
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1535
1535
   struct array_state_vector *arrays = state->array_state;
1536
1536
   struct array_state *a;
1577
1577
   static const uint16_t double_ops[5] = { 0, 4197, 4198, 4199, 4200 };
1578
1578
 
1579
1579
   uint16_t opcode;
1580
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1580
   struct glx_context *gc = __glXGetCurrentContext();
1581
1581
   __GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
1582
1582
   struct array_state_vector *arrays = state->array_state;
1583
1583
   struct array_state *a;
1690
1690
                                   GLenum type, GLsizei stride,
1691
1691
                                   const GLvoid * pointer)
1692
1692
{
1693
 
   __GLXcontext *gc = __glXGetCurrentContext();
 
1693
   struct glx_context *gc = __glXGetCurrentContext();
1694
1694
   GLboolean normalized = GL_FALSE;
1695
1695
 
1696
1696
 
1718
1718
void
1719
1719
__indirect_glClientActiveTextureARB(GLenum texture)
1720
1720
{
1721
 
   __GLXcontext *const gc = __glXGetCurrentContext();
 
1721
   struct glx_context *const gc = __glXGetCurrentContext();
1722
1722
   __GLXattribute *const state =
1723
1723
      (__GLXattribute *) (gc->client_state_private);
1724
1724
   struct array_state_vector *const arrays = state->array_state;