summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.h
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-02-16 02:53:34 -0800
committerCorbin Simpson <[email protected]>2009-02-16 03:16:59 -0800
commit1b77138a1effe2e18a9ce9e16c43852ff855a7be (patch)
tree7ddffca507077348fa90d0be01029a6ac6777c18 /src/gallium/drivers/r300/r300_context.h
parent82722a75c5d55bb8a553b525b4a1e481a7044718 (diff)
r300-gallium: Add draw_arrays and friends.
This is the last bit of Gallium-side plumbing for drawing things. From this point on, the only missing parts should be in r3xx-specific code areas...
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h36
1 files changed, 26 insertions, 10 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index caedbb84482..53e41bf76db 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -88,20 +88,31 @@ struct r300_texture_state {
#define R300_NEW_BLEND 0x0000001
#define R300_NEW_BLEND_COLOR 0x0000002
-#define R300_NEW_DSA 0x0000004
-#define R300_NEW_FRAMEBUFFERS 0x0000008
-#define R300_NEW_FRAGMENT_SHADER 0x0000010
-#define R300_NEW_RASTERIZER 0x0000020
-#define R300_NEW_SAMPLER 0x0000040
-#define R300_NEW_SCISSOR 0x0004000
-#define R300_NEW_TEXTURE 0x0008000
-#define R300_NEW_VERTEX_FORMAT 0x0800000
-#define R300_NEW_VERTEX_SHADER 0x1000000
-#define R300_NEW_KITCHEN_SINK 0x1ffffff
+#define R300_NEW_CONSTANTS 0x0000004
+#define R300_NEW_DSA 0x0000008
+#define R300_NEW_FRAMEBUFFERS 0x0000010
+#define R300_NEW_FRAGMENT_SHADER 0x0000020
+#define R300_NEW_RASTERIZER 0x0000040
+#define R300_NEW_SAMPLER 0x0000080
+#define R300_NEW_SCISSOR 0x0008000
+#define R300_NEW_TEXTURE 0x0010000
+#define R300_NEW_VERTEX_FORMAT 0x1000000
+#define R300_NEW_VERTEX_SHADER 0x2000000
+#define R300_NEW_KITCHEN_SINK 0x3ffffff
/* The next several objects are not pure Radeon state; they inherit from
* various Gallium classes. */
+struct r300_constant_buffer {
+ /* Buffer of constants */
+ /* XXX first number should be raised */
+ float constants[8][4];
+ /* Number of user-defined constants */
+ int user_count;
+ /* Total number of constants */
+ int count;
+};
+
struct r3xx_fragment_shader {
/* Parent class */
struct pipe_shader_state state;
@@ -188,6 +199,8 @@ struct r300_context {
struct r300_blend_state* blend_state;
/* Blend color state. */
struct r300_blend_color_state* blend_color_state;
+ /* Shader constants. */
+ struct r300_constant_buffer shader_constants[PIPE_SHADER_TYPES];
/* Depth, stencil, and alpha state. */
struct r300_dsa_state* dsa_state;
/* Fragment shader. */
@@ -205,6 +218,9 @@ struct r300_context {
struct r300_texture* textures[8];
struct r300_texture_state* texture_states[8];
int texture_count;
+ /* Vertex buffers. */
+ struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS];
+ int vertex_buffer_count;
/* Vertex information. */
struct vertex_info vertex_info;
/* Bitmask of dirty state objects. */