From 14d4fe286ba738fd9807be15f901e24e4199be27 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Jun 2022 11:38:24 -0600 Subject: [PATCH] draw: asst. clean-up in draw_context.h Signed-off-by: Brian Paul Acked-by: Dave Airlie Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/draw/draw_context.h | 83 +++++++++++++++++-------------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h index e1186b8..1cf548e 100644 --- a/src/gallium/auxiliary/draw/draw_context.h +++ b/src/gallium/auxiliary/draw/draw_context.h @@ -1,6 +1,6 @@ /************************************************************************** - * + * * Copyright 2007 VMware, Inc. * All Rights Reserved. * @@ -11,11 +11,11 @@ * 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. @@ -23,7 +23,7 @@ * 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. - * + * **************************************************************************/ /** @@ -51,9 +51,11 @@ struct draw_fragment_shader; struct tgsi_sampler; struct tgsi_image; struct tgsi_buffer; +struct lp_cached_code; + /* - * structure to contain driver internal information + * structure to contain driver internal information * for stream out support. mapping stores the pointer * to the buffer contents, and internal offset stores * an internal counter to how much of the stream @@ -67,7 +69,7 @@ struct draw_so_target { bool draw_has_llvm(void); -struct draw_context *draw_create( struct pipe_context *pipe ); +struct draw_context *draw_create(struct pipe_context *pipe); #ifdef DRAW_LLVM_AVAILABLE struct draw_context *draw_create_with_llvm_context(struct pipe_context *pipe, @@ -76,17 +78,17 @@ struct draw_context *draw_create_with_llvm_context(struct pipe_context *pipe, struct draw_context *draw_create_no_llvm(struct pipe_context *pipe); -void draw_destroy( struct draw_context *draw ); +void draw_destroy(struct draw_context *draw); void draw_flush(struct draw_context *draw); -void draw_set_viewport_states( struct draw_context *draw, - unsigned start_slot, - unsigned num_viewports, - const struct pipe_viewport_state *viewports ); +void draw_set_viewport_states(struct draw_context *draw, + unsigned start_slot, + unsigned num_viewports, + const struct pipe_viewport_state *viewports); -void draw_set_clip_state( struct draw_context *pipe, - const struct pipe_clip_state *clip ); +void draw_set_clip_state(struct draw_context *pipe, + const struct pipe_clip_state *clip); /** * Sets the rasterization state used by the draw module. @@ -103,12 +105,12 @@ void draw_set_clip_state( struct draw_context *pipe, * draw_set_rasterizer_state(driver->draw, state->pipe_state, state); * driver->state.raster = state; */ -void draw_set_rasterizer_state( struct draw_context *draw, - const struct pipe_rasterizer_state *raster, - void *rast_handle ); +void draw_set_rasterizer_state(struct draw_context *draw, + const struct pipe_rasterizer_state *raster, + void *rast_handle); -void draw_set_rasterize_stage( struct draw_context *draw, - struct draw_stage *stage ); +void draw_set_rasterize_stage(struct draw_context *draw, + struct draw_stage *stage); void draw_wide_point_threshold(struct draw_context *draw, float threshold); @@ -288,7 +290,7 @@ void draw_set_vertex_buffers(struct draw_context *draw, const struct pipe_vertex_buffer *buffers); void draw_set_vertex_elements(struct draw_context *draw, - unsigned count, + unsigned count, const struct pipe_vertex_element *elements); void draw_set_indexes(struct draw_context *draw, @@ -320,7 +322,7 @@ draw_set_mapped_so_targets(struct draw_context *draw, /*********************************************************************** - * draw_pt.c + * draw_pt.c */ void draw_vbo(struct draw_context *draw, @@ -333,33 +335,38 @@ void draw_vbo(struct draw_context *draw, /******************************************************************************* - * Driver backend interface + * Driver backend interface */ struct vbuf_render; -void draw_set_render( struct draw_context *draw, - struct vbuf_render *render ); +void +draw_set_render(struct draw_context *draw, + struct vbuf_render *render); -void draw_set_driver_clipping( struct draw_context *draw, - boolean bypass_clip_xy, - boolean bypass_clip_z, - boolean guard_band_xy, - boolean bypass_clip_points); +void +draw_set_driver_clipping(struct draw_context *draw, + boolean bypass_clip_xy, + boolean bypass_clip_z, + boolean guard_band_xy, + boolean bypass_clip_points); /******************************************************************************* * Draw statistics */ -void draw_collect_pipeline_statistics(struct draw_context *draw, - boolean enable); +void +draw_collect_pipeline_statistics(struct draw_context *draw, + boolean enable); -void draw_collect_primitives_generated(struct draw_context *draw, - bool eanble); +void +draw_collect_primitives_generated(struct draw_context *draw, + bool eanble); /******************************************************************************* - * Draw pipeline + * Draw pipeline */ -boolean draw_need_pipeline(const struct draw_context *draw, - const struct pipe_rasterizer_state *rasterizer, - enum pipe_prim_type prim ); +boolean +draw_need_pipeline(const struct draw_context *draw, + const struct pipe_rasterizer_state *rasterizer, + enum pipe_prim_type prim); int draw_get_shader_param(enum pipe_shader_type shader, enum pipe_shader_cap param); @@ -371,7 +378,7 @@ draw_get_shader_param_no_llvm(enum pipe_shader_type shader, boolean draw_get_option_use_llvm(void); -struct lp_cached_code; + void draw_set_disk_cache_callbacks(struct draw_context *draw, void *data_cookie, @@ -381,4 +388,6 @@ draw_set_disk_cache_callbacks(struct draw_context *draw, void (*insert_shader)(void *cookie, struct lp_cached_code *cache, unsigned char ir_sha1_cache_key[20])); + + #endif /* DRAW_CONTEXT_H */ -- 2.7.4