gallium: replace PIPE_ATTRIB_MAX with PIPE_MAX_ATTRIBS
authorBrian <brian.paul@tungstengraphics.com>
Thu, 27 Mar 2008 23:41:55 +0000 (17:41 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 27 Mar 2008 23:41:55 +0000 (17:41 -0600)
The later follows the naming scheme of other limits.
Keep the old definition until all possible usage is updated.

29 files changed:
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
src/gallium/auxiliary/draw/draw_vf.c
src/gallium/auxiliary/draw/draw_vf.h
src/gallium/auxiliary/draw/draw_vs_exec.c
src/gallium/auxiliary/draw/draw_vs_llvm.c
src/gallium/auxiliary/draw/draw_vs_sse.c
src/gallium/drivers/cell/ppu/cell_context.h
src/gallium/drivers/cell/ppu/cell_draw_arrays.c
src/gallium/drivers/cell/ppu/cell_state_vertex.c
src/gallium/drivers/cell/ppu/cell_vertex_fetch.c
src/gallium/drivers/cell/spu/spu_main.c
src/gallium/drivers/cell/spu/spu_vertex_shader.c
src/gallium/drivers/cell/spu/spu_vertex_shader.h
src/gallium/drivers/failover/fo_context.h
src/gallium/drivers/failover/fo_state_emit.c
src/gallium/drivers/i915simple/i915_context.c
src/gallium/drivers/i915simple/i915_context.h
src/gallium/drivers/i965simple/brw_clip.h
src/gallium/drivers/i965simple/brw_context.h
src/gallium/drivers/i965simple/brw_state.c
src/gallium/drivers/i965simple/brw_wm.h
src/gallium/drivers/softpipe/sp_context.h
src/gallium/drivers/softpipe/sp_draw_arrays.c
src/gallium/drivers/softpipe/sp_quad_fs.c
src/gallium/drivers/softpipe/sp_state_vertex.c
src/gallium/include/pipe/p_state.h
src/mesa/state_tracker/st_draw.c

index 903cc267662a2797a17c923f4b694b60cf84c64c..81858e01cac3b70cbf662b1547a22bc19b1d60bb 100644 (file)
@@ -238,7 +238,7 @@ draw_set_vertex_buffer(struct draw_context *draw,
                        const struct pipe_vertex_buffer *buffer)
 {
    draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
-   assert(attr < PIPE_ATTRIB_MAX);
+   assert(attr < PIPE_MAX_ATTRIBS);
    draw->vertex_buffer[attr] = *buffer;
 }
 
@@ -249,7 +249,7 @@ draw_set_vertex_element(struct draw_context *draw,
                         const struct pipe_vertex_element *element)
 {
    draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE/*STATE_CHANGE*/ );
-   assert(attr < PIPE_ATTRIB_MAX);
+   assert(attr < PIPE_MAX_ATTRIBS);
    draw->vertex_element[attr] = *element;
 }
 
index 7007ee22c4d3df1f1a04e12b5319f31d8db78383..8eb2f515cbcee72d870f2176899c28a73725c521 100644 (file)
@@ -228,8 +228,8 @@ struct draw_context
    /* pipe state that we need: */
    const struct pipe_rasterizer_state *rasterizer;
    struct pipe_viewport_state viewport;
-   struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
-   struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
+   struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+   struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
    struct draw_vertex_shader *vertex_shader;
 
    uint num_vs_outputs;  /**< convenience, from vertex_shader */
@@ -242,7 +242,7 @@ struct draw_context
       unsigned eltSize;
 
       /** vertex arrays */
-      const void *vbuffer[PIPE_ATTRIB_MAX];
+      const void *vbuffer[PIPE_MAX_ATTRIBS];
 
       /** constant buffer (for vertex shader) */
       const void *constants;
@@ -275,9 +275,9 @@ struct draw_context
    /* Vertex fetch internal state
     */
    struct {
-      const ubyte *src_ptr[PIPE_ATTRIB_MAX];
-      unsigned pitch[PIPE_ATTRIB_MAX];
-      fetch_func fetch[PIPE_ATTRIB_MAX];
+      const ubyte *src_ptr[PIPE_MAX_ATTRIBS];
+      unsigned pitch[PIPE_MAX_ATTRIBS];
+      fetch_func fetch[PIPE_MAX_ATTRIBS];
       unsigned nr_attrs;
       full_fetch_func fetch_func;
       pt_fetch_func pt_fetch;
index 64ef83d8001fc17501148f42b4fd03516727f261..9b098bc173fa83e56f614997d5159445a79dc710 100644 (file)
@@ -78,7 +78,7 @@ struct fetch_emit_middle_end {
       unsigned pitch;
       void (*fetch)( const void *from, float *attrib);
       void (*emit)( const float *attrib, float **out );
-   } fetch[PIPE_ATTRIB_MAX];
+   } fetch[PIPE_MAX_ATTRIBS];
    
    unsigned nr_fetch;
    unsigned hw_vertex_size;
index f4e29a6293276eb80124f33a3370c75878cdfaad..7bb34ace7aacf5f730674804f4ea227246f271ba 100644 (file)
@@ -158,7 +158,7 @@ draw_vf_set_vertex_attributes( struct draw_vertex_fetch *vf,
    unsigned offset = 0;
    unsigned i, j;
 
-   assert(nr < PIPE_ATTRIB_MAX);
+   assert(nr < PIPE_MAX_ATTRIBS);
 
    for (j = 0, i = 0; i < nr; i++) {
       const unsigned format = map[i].format;
@@ -390,7 +390,7 @@ struct draw_vertex_fetch *draw_vf_create( void )
    struct draw_vertex_fetch *vf = CALLOC_STRUCT(draw_vertex_fetch);
    unsigned i;
 
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++)
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++)
       vf->attr[i].vf = vf;
 
    vf->identity[0] = 0.0;
index 011c8f0ff1cbf980f841338611beccf0a95f475a..7555d1bd588940fa61ef794359752a3f7d03032e 100644 (file)
@@ -169,7 +169,7 @@ struct draw_vf_attr
 
 struct draw_vertex_fetch
 {
-   struct draw_vf_attr attr[PIPE_ATTRIB_MAX];
+   struct draw_vf_attr attr[PIPE_MAX_ATTRIBS];
    unsigned attr_count;
    unsigned vertex_stride;
 
index 4e2fa727070a91a2311460eee26c66d5fd08ccfb..487d0ea7f4f4c361f42e3a6a568599b4f41c66eb 100644 (file)
@@ -99,8 +99,8 @@ vs_exec_run( struct draw_vertex_shader *shader,
    struct tgsi_exec_machine *machine = &draw->machine;
    unsigned int j;
 
-   ALIGN16_DECL(struct tgsi_exec_vector, inputs, PIPE_ATTRIB_MAX);
-   ALIGN16_DECL(struct tgsi_exec_vector, outputs, PIPE_ATTRIB_MAX);
+   ALIGN16_DECL(struct tgsi_exec_vector, inputs, PIPE_MAX_ATTRIBS);
+   ALIGN16_DECL(struct tgsi_exec_vector, outputs, PIPE_MAX_ATTRIBS);
    const float *scale = draw->viewport.scale;
    const float *trans = draw->viewport.translate;
 
index bd983f2ddfa52a91962031706d17457874f7a983..d29cb18efe493a68321304eee293fd2488b471d2 100644 (file)
@@ -107,8 +107,8 @@ vs_llvm_run( struct draw_vertex_shader *base,
    struct tgsi_exec_machine *machine = &draw->machine;
    unsigned int j;
 
-   ALIGN16_DECL(struct tgsi_exec_vector, inputs, PIPE_ATTRIB_MAX);
-   ALIGN16_DECL(struct tgsi_exec_vector, outputs, PIPE_ATTRIB_MAX);
+   ALIGN16_DECL(struct tgsi_exec_vector, inputs, PIPE_MAX_ATTRIBS);
+   ALIGN16_DECL(struct tgsi_exec_vector, outputs, PIPE_MAX_ATTRIBS);
    const float *scale = draw->viewport.scale;
    const float *trans = draw->viewport.translate;
 
index a4503c143edcd09a5ce358938a4ccccd1354978f..bc910dc2d042508a6cad1ee832d3bb68464fd5a9 100644 (file)
@@ -114,8 +114,8 @@ vs_sse_run( struct draw_vertex_shader *base,
    struct tgsi_exec_machine *machine = &draw->machine;
    unsigned int j;
 
-   ALIGN16_DECL(struct tgsi_exec_vector, inputs, PIPE_ATTRIB_MAX);
-   ALIGN16_DECL(struct tgsi_exec_vector, outputs, PIPE_ATTRIB_MAX);
+   ALIGN16_DECL(struct tgsi_exec_vector, inputs, PIPE_MAX_ATTRIBS);
+   ALIGN16_DECL(struct tgsi_exec_vector, outputs, PIPE_MAX_ATTRIBS);
    const float *scale = draw->viewport.scale;
    const float *trans = draw->viewport.translate;
 
index 0442abddc181f93278543b88f8c10ec66472340e..7f656a974478e06c4e00c2bd9826a6ccadbec3be 100644 (file)
@@ -103,8 +103,8 @@ struct cell_context
    struct cell_texture *texture[PIPE_MAX_SAMPLERS];
    uint num_textures;
    struct pipe_viewport_state viewport;
-   struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
-   struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
+   struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+   struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
 
    ubyte *cbuf_map[PIPE_MAX_COLOR_BUFS];
    ubyte *zsbuf_map;
@@ -141,7 +141,7 @@ struct cell_context
 
 
    struct spe_function attrib_fetch;
-   unsigned attrib_fetch_offsets[PIPE_ATTRIB_MAX];
+   unsigned attrib_fetch_offsets[PIPE_MAX_ATTRIBS];
 };
 
 
index c839fb4d12da6028c0d3e24da05d7cd88dd1a0b3..b896252f817a7657f7aef515e99b1fe809bad408 100644 (file)
@@ -123,7 +123,7 @@ cell_draw_elements(struct pipe_context *pipe,
    /*
     * Map vertex buffers
     */
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
       if (sp->vertex_buffer[i].buffer) {
          void *buf = pipe->winsys->buffer_map(pipe->winsys,
                                               sp->vertex_buffer[i].buffer,
@@ -151,7 +151,7 @@ cell_draw_elements(struct pipe_context *pipe,
    /*
     * unmap vertex/index buffers - will cause draw module to flush
     */
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
       if (sp->vertex_buffer[i].buffer) {
          draw_set_mapped_vertex_buffer(draw, i, NULL);
          pipe->winsys->buffer_unmap(pipe->winsys, sp->vertex_buffer[i].buffer);
index 563831b62db62390c54abc507b9fecf7e56d8521..37d25fb357893705335e218de176c5e538d2c821 100644 (file)
@@ -41,7 +41,7 @@ cell_set_vertex_element(struct pipe_context *pipe,
                             const struct pipe_vertex_element *attrib)
 {
    struct cell_context *cell = cell_context(pipe);
-   assert(index < PIPE_ATTRIB_MAX);
+   assert(index < PIPE_MAX_ATTRIBS);
    cell->vertex_element[index] = *attrib; /* struct copy */
    cell->dirty |= CELL_NEW_VERTEX;
 
@@ -55,7 +55,7 @@ cell_set_vertex_buffer(struct pipe_context *pipe,
                            const struct pipe_vertex_buffer *buffer)
 {
    struct cell_context *cell = cell_context(pipe);
-   assert(index < PIPE_ATTRIB_MAX);
+   assert(index < PIPE_MAX_ATTRIBS);
    cell->vertex_buffer[index] = *buffer; /* struct copy */
    cell->dirty |= CELL_NEW_VERTEX;
 
index 4828a8023bd507eada5d0da849cc0f4512338d85..49d5443cde7b16fbc7caa7cf911195dd383728fc 100644 (file)
@@ -263,7 +263,7 @@ void cell_update_vertex_fetch(struct draw_context *draw)
    struct cell_context *const cell =
        (struct cell_context *) draw->driver_private;
    struct spe_function *p = &cell->attrib_fetch;
-   unsigned function_index[PIPE_ATTRIB_MAX];
+   unsigned function_index[PIPE_MAX_ATTRIBS];
    unsigned unique_attr_formats;
    int out_ptr;
    int in_ptr;
index fccff01e1089e339f9507702effdf848dc9756f6..d7f46f80246afc50d1c05a87c22fb58372a1fd60 100644 (file)
@@ -55,7 +55,7 @@ struct spu_global spu;
 
 struct spu_vs_context draw;
 
-static unsigned char attribute_fetch_code_buffer[136 * PIPE_ATTRIB_MAX]
+static unsigned char attribute_fetch_code_buffer[136 * PIPE_MAX_ATTRIBS]
     ALIGN16_ATTRIB;
 
 static unsigned char depth_stencil_code_buffer[4 * 64]
@@ -361,7 +361,7 @@ cmd_state_vs_array_info(const struct cell_array_info *vs_info)
 {
    const unsigned attr = vs_info->attr;
 
-   ASSERT(attr < PIPE_ATTRIB_MAX);
+   ASSERT(attr < PIPE_MAX_ATTRIBS);
    draw.vertex_fetch.src_ptr[attr] = vs_info->base;
    draw.vertex_fetch.pitch[attr] = vs_info->pitch;
    draw.vertex_fetch.size[attr] = vs_info->size;
index 8363efeeb6e34a00326fed4115d49764db6b7b92..3119a78c0608f8b1ba2ce364435a376862b2ef40 100644 (file)
@@ -86,8 +86,8 @@ run_vertex_program(struct spu_vs_context *draw,
    struct spu_exec_machine *machine = &draw->machine;
    unsigned int j;
 
-   ALIGN16_DECL(struct spu_exec_vector, inputs, PIPE_ATTRIB_MAX);
-   ALIGN16_DECL(struct spu_exec_vector, outputs, PIPE_ATTRIB_MAX);
+   ALIGN16_DECL(struct spu_exec_vector, inputs, PIPE_MAX_ATTRIBS);
+   ALIGN16_DECL(struct spu_exec_vector, outputs, PIPE_MAX_ATTRIBS);
    const float *scale = draw->viewport.scale;
    const float *trans = draw->viewport.translate;
 
index 54a4b8d9b9fb1142964e3a9779483e3907f9a5c8..4c74f5e74d58f4875e3a544788c9ef96136fc736 100644 (file)
@@ -16,10 +16,10 @@ struct spu_vs_context {
    struct pipe_viewport_state viewport;
 
    struct {
-      uint64_t src_ptr[PIPE_ATTRIB_MAX];
-      unsigned pitch[PIPE_ATTRIB_MAX];
-      unsigned size[PIPE_ATTRIB_MAX];
-      unsigned code_offset[PIPE_ATTRIB_MAX];
+      uint64_t src_ptr[PIPE_MAX_ATTRIBS];
+      unsigned pitch[PIPE_MAX_ATTRIBS];
+      unsigned size[PIPE_MAX_ATTRIBS];
+      unsigned code_offset[PIPE_MAX_ATTRIBS];
       unsigned nr_attrs;
       boolean dirty;
 
index 8f3ad3ee7983de4d666398c1dd33b9ba06aa5b6b..4afe10c4b86ab1c710d26b50e8b7d8af255dade2 100644 (file)
@@ -84,8 +84,8 @@ struct failover_context {
    struct pipe_scissor_state scissor;
    struct pipe_texture *texture[PIPE_MAX_SAMPLERS];
    struct pipe_viewport_state viewport;
-   struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
-   struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
+   struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+   struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
 
    void *sw_sampler_state[PIPE_MAX_SAMPLERS];
    void *hw_sampler_state[PIPE_MAX_SAMPLERS];
index 3de931e04eb5955661fbe6291010e07c8090f743..bb89f925e93d5b81ecc413f490a04afaa0cf175a 100644 (file)
@@ -104,7 +104,7 @@ failover_state_emit( struct failover_context *failover )
    }
 
    if (failover->dirty & FO_NEW_VERTEX_BUFFER) {
-      for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+      for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
         if (failover->dirty_vertex_buffer & (1<<i)) {
            failover->sw->set_vertex_buffer( failover->sw, i, 
                                             &failover->vertex_buffer[i] );
@@ -113,7 +113,7 @@ failover_state_emit( struct failover_context *failover )
    }
 
    if (failover->dirty & FO_NEW_VERTEX_ELEMENT) {
-      for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+      for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
         if (failover->dirty_vertex_element & (1<<i)) {
            failover->sw->set_vertex_element( failover->sw, i, 
                                              &failover->vertex_element[i] );
index 15ff2360b74ce24969299d208e998f0a704e81d3..fee33d82de45ba60444116f34e9b00edf0940174 100644 (file)
@@ -65,7 +65,7 @@ i915_draw_elements( struct pipe_context *pipe,
    /*
     * Map vertex buffers
     */
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
       if (i915->vertex_buffer[i].buffer) {
          void *buf
             = pipe->winsys->buffer_map(pipe->winsys,
@@ -96,7 +96,7 @@ i915_draw_elements( struct pipe_context *pipe,
    /*
     * unmap vertex/index buffers
     */
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
       if (i915->vertex_buffer[i].buffer) {
          pipe->winsys->buffer_unmap(pipe->winsys, i915->vertex_buffer[i].buffer);
          draw_set_mapped_vertex_buffer(draw, i, NULL);
index 746f18ba38d5e6ecb6ddc875a414e5c495022674..8e707ea574ae9e1d49ff30c96b5a62293dc2325e 100644 (file)
@@ -232,7 +232,7 @@ struct i915_context
    struct pipe_scissor_state scissor;\r
    struct i915_texture *texture[PIPE_MAX_SAMPLERS];\r
    struct pipe_viewport_state viewport;\r
-   struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];\r
+   struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];\r
 \r
    unsigned dirty;\r
 \r
index a89d08b79100e3f0d1c4e022fa62030eb00d7581..d70fc094ff5435cbbabc9757737326faa206ad34 100644 (file)
@@ -116,7 +116,7 @@ struct brw_clip_compile {
    unsigned last_mrf;
 
    unsigned header_position_offset;
-   unsigned offset[PIPE_ATTRIB_MAX];
+   unsigned offset[PIPE_MAX_ATTRIBS];
 };
 
 #define ATTR_SIZE  (4*4)
index b83a13c3b6b8a578a460c8a8e1eccc337e6edca6..0c96ba1732756af0002174f110fc78f0dc70212f 100644 (file)
@@ -433,17 +433,17 @@ struct brw_cached_batch_item {
 \r
 \r
 \r
-/* Protect against a future where PIPE_ATTRIB_MAX > 32.  Wouldn't life\r
+/* Protect against a future where PIPE_MAX_ATTRIBS > 32.  Wouldn't life\r
  * be easier if C allowed arrays of packed elements?\r
  */\r
-#define ATTRIB_BIT_DWORDS  ((PIPE_ATTRIB_MAX+31)/32)\r
+#define ATTRIB_BIT_DWORDS  ((PIPE_MAX_ATTRIBS+31)/32)\r
 \r
 \r
 \r
 \r
 struct brw_vertex_info {\r
-   unsigned varying;  /* varying:1[PIPE_ATTRIB_MAX] */\r
-   unsigned sizes[ATTRIB_BIT_DWORDS * 2]; /* sizes:2[PIPE_ATTRIB_MAX] */\r
+   unsigned varying;  /* varying:1[PIPE_MAX_ATTRIBS] */\r
+   unsigned sizes[ATTRIB_BIT_DWORDS * 2]; /* sizes:2[PIPE_MAX_ATTRIBS] */\r
 };\r
 \r
 \r
@@ -496,9 +496,9 @@ struct brw_context
       /* Arrays with buffer objects to copy non-bufferobj arrays into\r
        * for upload:\r
        */\r
-      const struct pipe_vertex_buffer *vbo_array[PIPE_ATTRIB_MAX];\r
+      const struct pipe_vertex_buffer *vbo_array[PIPE_MAX_ATTRIBS];\r
 \r
-      struct brw_vertex_element_state inputs[PIPE_ATTRIB_MAX];\r
+      struct brw_vertex_element_state inputs[PIPE_MAX_ATTRIBS];\r
 \r
 #define BRW_NR_UPLOAD_BUFS 17\r
 #define BRW_UPLOAD_INIT_SIZE (128*1024)\r
index f5efe9fc06d322ce97cd09f9e89c469e88fe75eb..0d04a8a5947567cf7b66d472bec945d04899ff76 100644 (file)
@@ -292,7 +292,7 @@ static void brw_set_vertex_element(struct pipe_context *pipe,
    /* flush ? */\r
    struct brw_context *brw = brw_context(pipe);\r
 \r
-   assert(index < PIPE_ATTRIB_MAX);\r
+   assert(index < PIPE_MAX_ATTRIBS);\r
    struct brw_vertex_element_state el;\r
    memset(&el, 0, sizeof(el));\r
 \r
index a1ac0f504a63f731410a5dcb8387f54bffe89192..b29c4393f011077652d732514adf8e02a70c9dff 100644 (file)
@@ -76,7 +76,7 @@ struct brw_wm_prog_key {
 
 #define PROGRAM_INTERNAL_PARAM
 #define MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS 1024 /* 72 for GL_ARB_f_p */
-#define BRW_WM_MAX_INSN  (MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS*3 + PIPE_ATTRIB_MAX + 3)
+#define BRW_WM_MAX_INSN  (MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS*3 + PIPE_MAX_ATTRIBS + 3)
 #define BRW_WM_MAX_GRF   128           /* hardware limit */
 #define BRW_WM_MAX_VREG  (BRW_WM_MAX_INSN * 4)
 #define BRW_WM_MAX_REF   (BRW_WM_MAX_INSN * 12)
@@ -84,7 +84,7 @@ struct brw_wm_prog_key {
 #define BRW_WM_MAX_CONST 256
 #define BRW_WM_MAX_KILLS MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS
 
-#define PAYLOAD_DEPTH     (PIPE_ATTRIB_MAX)
+#define PAYLOAD_DEPTH     (PIPE_MAX_ATTRIBS)
 
 #define MAX_IFSN 32
 #define MAX_LOOP_DEPTH 32
index 19e6cfaf02e8827ba7febabc6d56cc7fd099b43e..dc9d0e6d5d660303cc529d6b7c66ab6518a03032 100644 (file)
@@ -77,8 +77,8 @@ struct softpipe_context {
    struct pipe_scissor_state scissor;
    struct pipe_texture *texture[PIPE_MAX_SAMPLERS];
    struct pipe_viewport_state viewport;
-   struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
-   struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
+   struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+   struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
    unsigned dirty;
 
    unsigned num_samplers;
@@ -92,7 +92,7 @@ struct softpipe_context {
    /*
     * Mapped vertex buffers
     */
-   ubyte *mapped_vbuffer[PIPE_ATTRIB_MAX];
+   ubyte *mapped_vbuffer[PIPE_MAX_ATTRIBS];
    
    /** Mapped constant buffers */
    void *mapped_constants[PIPE_SHADER_TYPES];
index 5b5a0fe5735b0296149b1fbf5d71d565fc618b18..ab54050d3fe1eb77c4a5b772290f8c09362cb836 100644 (file)
@@ -125,7 +125,7 @@ softpipe_draw_elements(struct pipe_context *pipe,
    /*
     * Map vertex buffers
     */
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
       if (sp->vertex_buffer[i].buffer) {
          void *buf
             = pipe->winsys->buffer_map(pipe->winsys,
@@ -153,7 +153,7 @@ softpipe_draw_elements(struct pipe_context *pipe,
    /*
     * unmap vertex/index buffers - will cause draw module to flush
     */
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
       if (sp->vertex_buffer[i].buffer) {
          draw_set_mapped_vertex_buffer(draw, i, NULL);
          pipe->winsys->buffer_unmap(pipe->winsys, sp->vertex_buffer[i].buffer);
index 861285101fdbcd5126bc15ad104d2638f5f75790..c10ad80e015162774f128068dad6a59dece40f32 100644 (file)
@@ -185,8 +185,8 @@ struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe )
    uint i;
 
    /* allocate storage for program inputs/outputs, aligned to 16 bytes */
-   qss->inputs = MALLOC(PIPE_ATTRIB_MAX * sizeof(*qss->inputs) + 16);
-   qss->outputs = MALLOC(PIPE_ATTRIB_MAX * sizeof(*qss->outputs) + 16);
+   qss->inputs = MALLOC(PIPE_MAX_ATTRIBS * sizeof(*qss->inputs) + 16);
+   qss->outputs = MALLOC(PIPE_MAX_ATTRIBS * sizeof(*qss->outputs) + 16);
    qss->machine.Inputs = align16(qss->inputs);
    qss->machine.Outputs = align16(qss->outputs);
 
index f01a10de3b4009611209aeffd941d2359f1a6657..c054e76d9bea61e7fd2d9685b1531ac3ff6b47a7 100644 (file)
@@ -42,7 +42,7 @@ softpipe_set_vertex_element(struct pipe_context *pipe,
                             const struct pipe_vertex_element *attrib)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
-   assert(index < PIPE_ATTRIB_MAX);
+   assert(index < PIPE_MAX_ATTRIBS);
    softpipe->vertex_element[index] = *attrib; /* struct copy */
    softpipe->dirty |= SP_NEW_VERTEX;
 
@@ -56,7 +56,7 @@ softpipe_set_vertex_buffer(struct pipe_context *pipe,
                            const struct pipe_vertex_buffer *buffer)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
-   assert(index < PIPE_ATTRIB_MAX);
+   assert(index < PIPE_MAX_ATTRIBS);
    softpipe->vertex_buffer[index] = *buffer; /* struct copy */
    softpipe->dirty |= SP_NEW_VERTEX;
 
index a2bd8c6aaab34e4ac403c09a2ca6783aaf9b33c2..2490412126fcbe4576ff5838f0fb325924aed305 100644 (file)
@@ -54,7 +54,8 @@ extern "C" {
 #define PIPE_MAX_SAMPLERS     8
 #define PIPE_MAX_CLIP_PLANES  6
 #define PIPE_MAX_CONSTANT    32
-#define PIPE_ATTRIB_MAX      32
+#define PIPE_MAX_ATTRIBS     32
+#define PIPE_ATTRIB_MAX      32 /* XXX obsolete - remove */
 #define PIPE_MAX_COLOR_BUFS   8
 #define PIPE_MAX_TEXTURE_LEVELS  16
 #define PIPE_MAX_FEEDBACK_ATTRIBS 16
index 20af90df7d848d4b37d05a610d7e64bc5f7c6790..4aca3311b7b3b94a7525c790915d91e2ebfa67c9 100644 (file)
@@ -606,7 +606,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
    /*
     * unmap vertex/index buffers
     */
-   for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
+   for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
       if (draw->vertex_buffer[i].buffer) {
          pipe->winsys->buffer_unmap(pipe->winsys,
                                     draw->vertex_buffer[i].buffer);