diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 16 | ||||
| -rw-r--r-- | src/gallium/drivers/r300/r300_defines.h | 47 | ||||
| -rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 7 | ||||
| -rw-r--r-- | src/gallium/drivers/r300/r300_screen.h | 2 | ||||
| -rw-r--r-- | src/gallium/drivers/r300/r300_winsys.h | 2 | 
5 files changed, 52 insertions, 22 deletions
| diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index edebeab86f..4bb385238e 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -30,6 +30,7 @@  #include "pipe/p_context.h"  #include "util/u_inlines.h" +#include "r300_defines.h"  #include "r300_screen.h"  struct u_upload_mgr; @@ -135,8 +136,6 @@ struct r300_texture_format_state {      uint32_t format2; /* R300_TX_FORMAT2: 0x4500 */  }; -#define R300_MAX_TEXTURE_LEVELS 13 -  struct r300_texture_fb_state {      /* Colorbuffer. */      uint32_t colorpitch[R300_MAX_TEXTURE_LEVELS]; /* R300_RB3D_COLORPITCH[0-3]*/ @@ -195,12 +194,6 @@ struct r300_ztop_state {      uint32_t z_buffer_top;      /* R300_ZB_ZTOP: 0x4f14 */  }; -#define R300_NEW_FRAGMENT_SHADER 0x00000020 -#define R300_NEW_FRAGMENT_SHADER_CONSTANTS    0x00000040 -#define R300_NEW_VERTEX_SHADER_CONSTANTS    0x10000000 -#define R300_NEW_QUERY           0x40000000 -#define R300_NEW_KITCHEN_SINK    0x7fffffff -  /* The next several objects are not pure Radeon state; they inherit from   * various Gallium classes. */ @@ -238,12 +231,6 @@ struct r300_query {      struct r300_query* next;  }; -enum r300_buffer_tiling { -    R300_BUFFER_LINEAR = 0, -    R300_BUFFER_TILED, -    R300_BUFFER_SQUARETILED -}; -  struct r300_texture {      /* Parent class */      struct pipe_texture tex; @@ -444,4 +431,3 @@ static INLINE void CTX_DBG(struct r300_context * ctx, unsigned flags,  #define DBG     CTX_DBG  #endif /* R300_CONTEXT_H */ - diff --git a/src/gallium/drivers/r300/r300_defines.h b/src/gallium/drivers/r300/r300_defines.h new file mode 100644 index 0000000000..2e04876de9 --- /dev/null +++ b/src/gallium/drivers/r300/r300_defines.h @@ -0,0 +1,47 @@ +/* + * Copyright 2010 Marek Olšák <maraeo@gmail.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +#ifndef R300_DEFINES_H +#define R300_DEFINES_H + +#include "pipe/p_defines.h" + +#define R300_MAX_TEXTURE_LEVELS         13 +#define R300_MAX_DRAW_VBO_SIZE          (1024 * 1024) + +#define R300_TEXTURE_USAGE_TRANSFER     PIPE_TEXTURE_USAGE_CUSTOM + +/* Non-atom dirty state flags. */ +#define R300_NEW_FRAGMENT_SHADER                0x00000020 +#define R300_NEW_FRAGMENT_SHADER_CONSTANTS      0x00000040 +#define R300_NEW_VERTEX_SHADER_CONSTANTS        0x10000000 +#define R300_NEW_QUERY                          0x40000000 +#define R300_NEW_KITCHEN_SINK                   0x7fffffff + +/* Tiling flags. */ +enum r300_buffer_tiling { +    R300_BUFFER_LINEAR = 0, +    R300_BUFFER_TILED, +    R300_BUFFER_SQUARETILED +}; + +#endif diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 2fed263a7a..93bf388776 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -41,9 +41,6 @@  #include "r300_render.h"  #include "r300_state_derived.h" -/* r300_render: Vertex and index buffer primitive emission. */ -#define R300_MAX_VBO_SIZE  (1024 * 1024) -  /* XXX The DRM rejects VAP_ALT_NUM_VERTICES.. */  //#define ENABLE_ALT_NUM_VERTS @@ -689,9 +686,9 @@ static boolean r300_render_allocate_vertices(struct vbuf_render* render,          r300render->vbo = pipe_buffer_create(screen,                                               64,                                               PIPE_BUFFER_USAGE_VERTEX, -                                             R300_MAX_VBO_SIZE); +                                             R300_MAX_DRAW_VBO_SIZE);          r300render->vbo_offset = 0; -        r300render->vbo_size = R300_MAX_VBO_SIZE; +        r300render->vbo_size = R300_MAX_DRAW_VBO_SIZE;      }      r300render->vertex_size = vertex_size; diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index c31f39e691..a055159c93 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -28,8 +28,6 @@  #include "r300_chipset.h" -#define R300_TEXTURE_USAGE_TRANSFER PIPE_TEXTURE_USAGE_CUSTOM -  struct r300_screen {      /* Parent class */      struct pipe_screen screen; diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index 1e6d43bea3..cd03355ab3 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -30,6 +30,8 @@  #include "pipe/p_defines.h"  #include "pipe/p_state.h" +#include "r300_defines.h" +  struct r300_winsys_screen;  /* Creates a new r300 screen. */ | 
