Path: blob/21.2-virgl/src/gallium/drivers/svga/svga_resource_buffer_upload.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_BUFFER_UPLOAD_H26#define SVGA_BUFFER_UPLOAD_H272829void30svga_buffer_upload_flush(struct svga_context *svga,31struct svga_buffer *sbuf);3233void34svga_buffer_add_range(struct svga_buffer *sbuf,35unsigned start,36unsigned end);3738enum pipe_error39svga_buffer_create_hw_storage(struct svga_screen *ss,40struct svga_buffer *sbuf,41unsigned bind_flags);4243void44svga_buffer_destroy_hw_storage(struct svga_screen *ss,45struct svga_buffer *sbuf);4647enum pipe_error48svga_buffer_create_host_surface(struct svga_screen *ss,49struct svga_buffer *sbuf,50unsigned bind_flags);5152enum pipe_error53svga_buffer_recreate_host_surface(struct svga_context *svga,54struct svga_buffer *sbuf,55unsigned bind_flags);5657enum pipe_error58svga_buffer_add_host_surface(struct svga_buffer *sbuf,59struct svga_winsys_surface *handle,60struct svga_host_surface_cache_key *key,61unsigned bind_flags);6263void64svga_buffer_bind_host_surface(struct svga_context *svga,65struct svga_buffer *sbuf,66struct svga_buffer_surface *bufsurf);6768enum pipe_error69svga_buffer_validate_host_surface(struct svga_context *svga,70struct svga_buffer *sbuf,71unsigned bind_flags);7273void74svga_buffer_destroy_host_surface(struct svga_screen *ss,75struct svga_buffer *sbuf);7677787980#endif /* SVGA_BUFFER_H */818283