Path: blob/21.2-virgl/src/gallium/drivers/svga/svga_draw.h
4570 views
/**********************************************************1* Copyright 2008-2009 VMware, Inc. All rights reserved.2*3* Permission is hereby granted, free of charge, to any person4* obtaining a copy of this software and associated documentation5* files (the "Software"), to deal in the Software without6* restriction, including without limitation the rights to use, copy,7* modify, merge, publish, distribute, sublicense, and/or sell copies8* of the Software, and to permit persons to whom the Software is9* furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice shall be12* included in all copies or substantial portions of the Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND17* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS18* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN19* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21* SOFTWARE.22*23**********************************************************/2425#ifndef SVGA_DRAW_H26#define SVGA_DRAW_H2728#include "pipe/p_compiler.h"2930#include "svga_hw_reg.h"3132struct svga_hwtnl;33struct svga_winsys_context;34struct svga_screen;35struct svga_context;36struct pipe_resource;37struct u_upload_mgr;3839struct svga_hwtnl *svga_hwtnl_create(struct svga_context *svga);4041void svga_hwtnl_destroy(struct svga_hwtnl *hwtnl);4243void svga_hwtnl_set_flatshade(struct svga_hwtnl *hwtnl,44boolean flatshade, boolean flatshade_first);4546void svga_hwtnl_set_fillmode(struct svga_hwtnl *hwtnl, unsigned mode);4748void49svga_hwtnl_vertex_decls(struct svga_hwtnl *hwtnl,50unsigned count,51const SVGA3dVertexDecl * decls,52const unsigned *buffer_indexes,53SVGA3dElementLayoutId layoutId);5455void56svga_hwtnl_vertex_buffers(struct svga_hwtnl *hwtnl,57unsigned count, struct pipe_vertex_buffer *buffers);5859enum pipe_error60svga_hwtnl_draw_arrays(struct svga_hwtnl *hwtnl,61enum pipe_prim_type prim, unsigned start, unsigned count,62unsigned start_instance, unsigned instance_count,63ubyte vertices_per_patch);6465enum pipe_error66svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,67const struct pipe_draw_info *info,68const struct pipe_draw_start_count_bias *draw,69unsigned count);7071boolean72svga_hwtnl_is_buffer_referred(struct svga_hwtnl *hwtnl,73struct pipe_resource *buffer);7475enum pipe_error svga_hwtnl_flush(struct svga_hwtnl *hwtnl);7677void svga_hwtnl_set_index_bias(struct svga_hwtnl *hwtnl, int index_bias);7879#endif /* SVGA_DRAW_H_ */808182