/* Opaque state. */
void* state;
/* Emit the state to the context. */
- void (*emit)(struct r300_context*, void*);
+ void (*emit)(struct r300_context*, unsigned, void*);
/* Upper bound on number of dwords to emit. */
unsigned size;
/* Whether this atom should be emitted. */
#include "r300_screen.h"
#include "r300_vs.h"
-void r300_emit_blend_state(struct r300_context* r300, void* state)
+void r300_emit_blend_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_blend_state* blend = (struct r300_blend_state*)state;
struct pipe_framebuffer_state* fb =
END_CS;
}
-void r300_emit_blend_color_state(struct r300_context* r300, void* state)
+void r300_emit_blend_color_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_blend_color_state* bc = (struct r300_blend_color_state*)state;
struct r300_screen* r300screen = r300_screen(r300->context.screen);
}
}
-void r300_emit_clip_state(struct r300_context* r300, void* state)
+void r300_emit_clip_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct pipe_clip_state* clip = (struct pipe_clip_state*)state;
int i;
}
-void r300_emit_dsa_state(struct r300_context* r300, void* state)
+void r300_emit_dsa_state(struct r300_context* r300, unsigned size, void* state)
{
struct r300_dsa_state* dsa = (struct r300_dsa_state*)state;
struct r300_screen* r300screen = r300_screen(r300->context.screen);
END_CS;
}
-void r300_emit_fb_state(struct r300_context* r300, void* state)
+void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
{
struct pipe_framebuffer_state* fb = (struct pipe_framebuffer_state*)state;
struct r300_screen* r300screen = r300_screen(r300->context.screen);
r300_emit_query_finish(r300, query);
}
-void r300_emit_rs_state(struct r300_context* r300, void* state)
+void r300_emit_rs_state(struct r300_context* r300, unsigned size, void* state)
{
struct r300_rs_state* rs = (struct r300_rs_state*)state;
float scale, offset;
END_CS;
}
-void r300_emit_rs_block_state(struct r300_context* r300, void* state)
+void r300_emit_rs_block_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_rs_block* rs = (struct r300_rs_block*)state;
unsigned i;
END_CS;
}
-void r300_emit_scissor_state(struct r300_context* r300, void* state)
+void r300_emit_scissor_state(struct r300_context* r300,
+ unsigned size, void* state)
{
unsigned minx, miny, maxx, maxy;
uint32_t top_left, bottom_right;
END_CS;
}
-void r300_emit_vertex_format_state(struct r300_context* r300, void* state)
+void r300_emit_vertex_format_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_vertex_info* vertex_info = (struct r300_vertex_info*)state;
unsigned i;
END_CS;
}
-void r300_emit_vs_state(struct r300_context* r300, void* state)
+void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state)
{
struct r300_vertex_shader* vs = (struct r300_vertex_shader*)state;
struct r300_vertex_program_code* code = &vs->code;
END_CS;
}
-void r300_emit_viewport_state(struct r300_context* r300, void* state)
+void r300_emit_viewport_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_viewport_state* viewport = (struct r300_viewport_state*)state;
CS_LOCALS(r300);
}
-void r300_emit_ztop_state(struct r300_context* r300, void* state)
+void r300_emit_ztop_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_ztop_state* ztop = (struct r300_ztop_state*)state;
CS_LOCALS(r300);
foreach(atom, &r300->atom_list) {
if (atom->dirty || atom->always_dirty) {
- atom->emit(r300, atom->state);
+ atom->emit(r300, atom->size, atom->state);
atom->dirty = FALSE;
}
}
void r300_emit_aos(struct r300_context* r300, unsigned offset);
-void r300_emit_blend_state(struct r300_context* r300, void* state);
+void r300_emit_blend_state(struct r300_context* r300,
+ unsigned size, void* state);
-void r300_emit_blend_color_state(struct r300_context* r300, void* state);
+void r300_emit_blend_color_state(struct r300_context* r300,
+ unsigned size, void* state);
-void r300_emit_clip_state(struct r300_context* r300, void* state);
+void r300_emit_clip_state(struct r300_context* r300,
+ unsigned size, void* state);
-void r300_emit_dsa_state(struct r300_context* r300, void* state);
+void r300_emit_dsa_state(struct r300_context* r300,
+ unsigned size, void* state);
void r300_emit_fragment_program_code(struct r300_context* r300,
struct rX00_fragment_program_code* generic_code);
void r500_emit_fs_constant_buffer(struct r300_context* r300,
struct rc_constant_list* constants);
-void r300_emit_fb_state(struct r300_context* r300, void* state);
+void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state);
void r300_emit_query_begin(struct r300_context* r300,
struct r300_query* query);
void r300_emit_query_end(struct r300_context* r300);
-void r300_emit_rs_state(struct r300_context* r300, void* state);
+void r300_emit_rs_state(struct r300_context* r300, unsigned size, void* state);
-void r300_emit_rs_block_state(struct r300_context* r300, void* state);
+void r300_emit_rs_block_state(struct r300_context* r300,
+ unsigned size, void* state);
-void r300_emit_scissor_state(struct r300_context* r300, void* state);
+void r300_emit_scissor_state(struct r300_context* r300,
+ unsigned size, void* state);
void r300_emit_texture(struct r300_context* r300,
struct r300_sampler_state* sampler,
void r300_emit_vertex_buffer(struct r300_context* r300);
-void r300_emit_vertex_format_state(struct r300_context* r300, void* state);
+void r300_emit_vertex_format_state(struct r300_context* r300,
+ unsigned size, void* state);
void r300_emit_vertex_program_code(struct r300_context* r300,
struct r300_vertex_program_code* code);
void r300_emit_vs_constant_buffer(struct r300_context* r300,
struct rc_constant_list* constants);
-void r300_emit_vs_state(struct r300_context* r300, void* state);
+void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state);
-void r300_emit_viewport_state(struct r300_context* r300, void* state);
+void r300_emit_viewport_state(struct r300_context* r300,
+ unsigned size, void* state);
void r300_emit_texture_count(struct r300_context* r300);
-void r300_emit_ztop_state(struct r300_context* r300, void* state);
+void r300_emit_ztop_state(struct r300_context* r300,
+ unsigned size, void* state);
void r300_flush_textures(struct r300_context* r300);
*
* Note that eventually this should be empty, but it's useful for development
* and general unduplication of code. */
-void r300_emit_invariant_state(struct r300_context* r300, void* state)
+void r300_emit_invariant_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_capabilities* caps = r300_screen(r300->context.screen)->caps;
CS_LOCALS(r300);
struct r300_context;
-void r300_emit_invariant_state(struct r300_context* r300, void* state);
+void r300_emit_invariant_state(struct r300_context* r300,
+ unsigned size, void* state);
#endif /* R300_STATE_INVARIANT_H */