r300g: put common defines into one file

This commit is contained in:
Marek Olšák
2010-03-21 21:34:18 +01:00
parent bc5778e202
commit d0d3abd360
5 changed files with 52 additions and 22 deletions
+1 -15
View File
@@ -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 */
+47
View File
@@ -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
+2 -5
View File
@@ -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;
-2
View File
@@ -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;
+2
View File
@@ -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. */