Path: blob/21.2-virgl/src/gallium/drivers/r300/r300_emit.h
4570 views
/*1* Copyright 2008 Corbin Simpson <[email protected]>2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* on the rights to use, copy, modify, merge, publish, distribute, sub7* license, and/or sell copies of the Software, and to permit persons to whom8* the Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL17* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,18* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR19* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE20* USE OR OTHER DEALINGS IN THE SOFTWARE. */2122#ifndef R300_EMIT_H23#define R300_EMIT_H2425#include "r300_context.h"2627struct rX00_fragment_program_code;28struct r300_vertex_program_code;2930uint32_t pack_float24(float f);3132void r300_emit_vertex_arrays(struct r300_context* r300, int offset,33boolean indexed, int instance_id);3435void r300_emit_blend_state(struct r300_context* r300,36unsigned size, void* state);3738void r300_emit_blend_color_state(struct r300_context* r300,39unsigned size, void* state);4041void r300_emit_clip_state(struct r300_context* r300,42unsigned size, void* state);4344void r300_emit_dsa_state(struct r300_context* r300,45unsigned size, void* state);4647void r300_emit_hyperz_state(struct r300_context *r300,48unsigned size, void *state);4950void r300_emit_hyperz_end(struct r300_context *r300);5152void r300_emit_fs(struct r300_context* r300, unsigned size, void *state);5354void r300_emit_fs_constants(struct r300_context* r300, unsigned size, void *state);5556void r300_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, void *state);5758void r500_emit_fs(struct r300_context* r300, unsigned size, void *state);5960void r500_emit_fs_constants(struct r300_context* r300, unsigned size, void *state);6162void r500_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, void *state);6364void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state);6566void r300_emit_fb_state_pipelined(struct r300_context *r300,67unsigned size, void *state);6869void r300_emit_gpu_flush(struct r300_context *r300, unsigned size, void *state);7071void r300_emit_aa_state(struct r300_context *r300, unsigned size, void *state);7273void r300_emit_query_start(struct r300_context *r300, unsigned size, void *state);7475void r300_emit_query_end(struct r300_context* r300);7677void r300_emit_rs_state(struct r300_context* r300, unsigned size, void* state);7879void r300_emit_rs_block_state(struct r300_context* r300,80unsigned size, void* state);8182void r300_emit_sample_mask(struct r300_context *r300,83unsigned size, void *state);8485void r300_emit_scissor_state(struct r300_context* r300,86unsigned size, void* state);8788void r300_emit_textures_state(struct r300_context *r300,89unsigned size, void *state);9091void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed);9293void r300_emit_vap_invariant_state(struct r300_context *r300,94unsigned size, void *state);9596void r300_emit_vertex_stream_state(struct r300_context* r300,97unsigned size, void* state);9899void r300_emit_vs_constants(struct r300_context* r300,100unsigned size, void *state);101102void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state);103104void r300_emit_viewport_state(struct r300_context* r300,105unsigned size, void* state);106107void r300_emit_ztop_state(struct r300_context* r300,108unsigned size, void* state);109110void r300_emit_pvs_flush(struct r300_context* r300, unsigned size, void* state);111112void r300_emit_texture_cache_inval(struct r300_context* r300, unsigned size, void* state);113114void r300_emit_invariant_state(struct r300_context *r300,115unsigned size, void *state);116117void r300_emit_hiz_clear(struct r300_context *r300, unsigned size, void *state);118void r300_emit_zmask_clear(struct r300_context *r300, unsigned size, void *state);119void r300_emit_cmask_clear(struct r300_context *r300, unsigned size, void *state);120121unsigned r300_get_num_dirty_dwords(struct r300_context *r300);122unsigned r300_get_num_cs_end_dwords(struct r300_context *r300);123124/* Emit all dirty state. */125void r300_emit_dirty_state(struct r300_context* r300);126127boolean r300_emit_buffer_validate(struct r300_context *r300,128boolean do_validate_vertex_buffers,129struct pipe_resource *index_buffer);130131#endif /* R300_EMIT_H */132133134