1bf215546Sopenharmony_ci/*
2bf215546Sopenharmony_ci * Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
3bf215546Sopenharmony_ci *
4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
5bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
6bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation
7bf215546Sopenharmony_ci * on the rights to use, copy, modify, merge, publish, distribute, sub
8bf215546Sopenharmony_ci * license, and/or sell copies of the Software, and to permit persons to whom
9bf215546Sopenharmony_ci * the Software is furnished to do so, subject to the following conditions:
10bf215546Sopenharmony_ci *
11bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next
12bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the
13bf215546Sopenharmony_ci * Software.
14bf215546Sopenharmony_ci *
15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18bf215546Sopenharmony_ci * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19bf215546Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20bf215546Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. */
22bf215546Sopenharmony_ci
23bf215546Sopenharmony_ci#ifndef R300_EMIT_H
24bf215546Sopenharmony_ci#define R300_EMIT_H
25bf215546Sopenharmony_ci
26bf215546Sopenharmony_ci#include "r300_context.h"
27bf215546Sopenharmony_ci
28bf215546Sopenharmony_cistruct rX00_fragment_program_code;
29bf215546Sopenharmony_cistruct r300_vertex_program_code;
30bf215546Sopenharmony_ci
31bf215546Sopenharmony_ciuint32_t pack_float24(float f);
32bf215546Sopenharmony_ci
33bf215546Sopenharmony_civoid r300_emit_vertex_arrays(struct r300_context* r300, int offset,
34bf215546Sopenharmony_ci                             boolean indexed, int instance_id);
35bf215546Sopenharmony_ci
36bf215546Sopenharmony_civoid r300_emit_blend_state(struct r300_context* r300,
37bf215546Sopenharmony_ci                           unsigned size, void* state);
38bf215546Sopenharmony_ci
39bf215546Sopenharmony_civoid r300_emit_blend_color_state(struct r300_context* r300,
40bf215546Sopenharmony_ci                                 unsigned size, void* state);
41bf215546Sopenharmony_ci
42bf215546Sopenharmony_civoid r300_emit_clip_state(struct r300_context* r300,
43bf215546Sopenharmony_ci                          unsigned size, void* state);
44bf215546Sopenharmony_ci
45bf215546Sopenharmony_civoid r300_emit_dsa_state(struct r300_context* r300,
46bf215546Sopenharmony_ci                         unsigned size, void* state);
47bf215546Sopenharmony_ci
48bf215546Sopenharmony_civoid r300_emit_hyperz_state(struct r300_context *r300,
49bf215546Sopenharmony_ci                            unsigned size, void *state);
50bf215546Sopenharmony_ci
51bf215546Sopenharmony_civoid r300_emit_hyperz_end(struct r300_context *r300);
52bf215546Sopenharmony_ci
53bf215546Sopenharmony_civoid r300_emit_fs(struct r300_context* r300, unsigned size, void *state);
54bf215546Sopenharmony_ci
55bf215546Sopenharmony_civoid r300_emit_fs_constants(struct r300_context* r300, unsigned size, void *state);
56bf215546Sopenharmony_ci
57bf215546Sopenharmony_civoid r300_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, void *state);
58bf215546Sopenharmony_ci
59bf215546Sopenharmony_civoid r500_emit_fs(struct r300_context* r300, unsigned size, void *state);
60bf215546Sopenharmony_ci
61bf215546Sopenharmony_civoid r500_emit_fs_constants(struct r300_context* r300, unsigned size, void *state);
62bf215546Sopenharmony_ci
63bf215546Sopenharmony_civoid r500_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, void *state);
64bf215546Sopenharmony_ci
65bf215546Sopenharmony_civoid r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state);
66bf215546Sopenharmony_ci
67bf215546Sopenharmony_civoid r300_emit_fb_state_pipelined(struct r300_context *r300,
68bf215546Sopenharmony_ci                                  unsigned size, void *state);
69bf215546Sopenharmony_ci
70bf215546Sopenharmony_civoid r300_emit_gpu_flush(struct r300_context *r300, unsigned size, void *state);
71bf215546Sopenharmony_ci
72bf215546Sopenharmony_civoid r300_emit_aa_state(struct r300_context *r300, unsigned size, void *state);
73bf215546Sopenharmony_ci
74bf215546Sopenharmony_civoid r300_emit_query_start(struct r300_context *r300, unsigned size, void *state);
75bf215546Sopenharmony_ci
76bf215546Sopenharmony_civoid r300_emit_query_end(struct r300_context* r300);
77bf215546Sopenharmony_ci
78bf215546Sopenharmony_civoid r300_emit_rs_state(struct r300_context* r300, unsigned size, void* state);
79bf215546Sopenharmony_ci
80bf215546Sopenharmony_civoid r300_emit_rs_block_state(struct r300_context* r300,
81bf215546Sopenharmony_ci                              unsigned size, void* state);
82bf215546Sopenharmony_ci
83bf215546Sopenharmony_civoid r300_emit_sample_mask(struct r300_context *r300,
84bf215546Sopenharmony_ci                           unsigned size, void *state);
85bf215546Sopenharmony_ci
86bf215546Sopenharmony_civoid r300_emit_scissor_state(struct r300_context* r300,
87bf215546Sopenharmony_ci                             unsigned size, void* state);
88bf215546Sopenharmony_ci
89bf215546Sopenharmony_civoid r300_emit_textures_state(struct r300_context *r300,
90bf215546Sopenharmony_ci                              unsigned size, void *state);
91bf215546Sopenharmony_ci
92bf215546Sopenharmony_civoid r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed);
93bf215546Sopenharmony_ci
94bf215546Sopenharmony_civoid r300_emit_vap_invariant_state(struct r300_context *r300,
95bf215546Sopenharmony_ci                                   unsigned size, void *state);
96bf215546Sopenharmony_ci
97bf215546Sopenharmony_civoid r300_emit_vertex_stream_state(struct r300_context* r300,
98bf215546Sopenharmony_ci                                   unsigned size, void* state);
99bf215546Sopenharmony_ci
100bf215546Sopenharmony_civoid r300_emit_vs_constants(struct r300_context* r300,
101bf215546Sopenharmony_ci                            unsigned size, void *state);
102bf215546Sopenharmony_ci
103bf215546Sopenharmony_civoid r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state);
104bf215546Sopenharmony_ci
105bf215546Sopenharmony_civoid r300_emit_viewport_state(struct r300_context* r300,
106bf215546Sopenharmony_ci                              unsigned size, void* state);
107bf215546Sopenharmony_ci
108bf215546Sopenharmony_civoid r300_emit_ztop_state(struct r300_context* r300,
109bf215546Sopenharmony_ci                          unsigned size, void* state);
110bf215546Sopenharmony_ci
111bf215546Sopenharmony_civoid r300_emit_pvs_flush(struct r300_context* r300, unsigned size, void* state);
112bf215546Sopenharmony_ci
113bf215546Sopenharmony_civoid r300_emit_texture_cache_inval(struct r300_context* r300, unsigned size, void* state);
114bf215546Sopenharmony_ci
115bf215546Sopenharmony_civoid r300_emit_invariant_state(struct r300_context *r300,
116bf215546Sopenharmony_ci                               unsigned size, void *state);
117bf215546Sopenharmony_ci
118bf215546Sopenharmony_civoid r300_emit_hiz_clear(struct r300_context *r300, unsigned size, void *state);
119bf215546Sopenharmony_civoid r300_emit_zmask_clear(struct r300_context *r300, unsigned size, void *state);
120bf215546Sopenharmony_civoid r300_emit_cmask_clear(struct r300_context *r300, unsigned size, void *state);
121bf215546Sopenharmony_ci
122bf215546Sopenharmony_ciunsigned r300_get_num_dirty_dwords(struct r300_context *r300);
123bf215546Sopenharmony_ciunsigned r300_get_num_cs_end_dwords(struct r300_context *r300);
124bf215546Sopenharmony_ci
125bf215546Sopenharmony_ci/* Emit all dirty state. */
126bf215546Sopenharmony_civoid r300_emit_dirty_state(struct r300_context* r300);
127bf215546Sopenharmony_ci
128bf215546Sopenharmony_ciboolean r300_emit_buffer_validate(struct r300_context *r300,
129bf215546Sopenharmony_ci                                  boolean do_validate_vertex_buffers,
130bf215546Sopenharmony_ci                                  struct pipe_resource *index_buffer);
131bf215546Sopenharmony_ci
132bf215546Sopenharmony_ci#endif /* R300_EMIT_H */
133