X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsvga%2Fsvga_resource_buffer.h;h=db533416ec4cef9d0591d1cfd7ab48c9eb0ea601;hb=ee8488ea3b99ad0632e5eac6defcef0264d8782c;hp=69075888892056e8167fd9e22f6a6cd3b193f290;hpb=4f74b379aa05e133cdd19865662eceacee4f63f4;p=mesa.git diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h index 69075888892..db533416ec4 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer.h +++ b/src/gallium/drivers/svga/svga_resource_buffer.h @@ -58,6 +58,18 @@ struct svga_buffer_range struct svga_3d_update_gb_image; +/** + * This structure describes the bind flags and cache key associated + * with the host surface. + */ +struct svga_buffer_surface +{ + struct list_head list; + unsigned bind_flags; + struct svga_host_surface_cache_key key; + struct svga_winsys_surface *handle; +}; + /** * SVGA pipe buffer. */ @@ -100,6 +112,12 @@ struct svga_buffer */ struct svga_winsys_surface *handle; + /** + * List of surfaces created for this buffer resource to support + * incompatible bind flags. + */ + struct list_head surfaces; + /** * Information about ongoing and past map operations. */ @@ -255,6 +273,7 @@ svga_buffer_has_hw_storage(struct svga_buffer *sbuf) /** * Map the hardware storage of a buffer. + * \param flags bitmask of PIPE_TRANSFER_* flags */ static inline void * svga_buffer_hw_storage_map(struct svga_context *svga, @@ -263,7 +282,7 @@ svga_buffer_hw_storage_map(struct svga_context *svga, { struct svga_winsys_screen *sws = svga_buffer_winsys_screen(sbuf); - svga->hud.num_resources_mapped++; + svga->hud.num_buffers_mapped++; if (sws->have_gb_objects) { return svga->swc->surface_map(svga->swc, sbuf->handle, flags, retry); @@ -324,7 +343,8 @@ svga_buffer_create(struct pipe_screen *screen, */ struct svga_winsys_surface * svga_buffer_handle(struct svga_context *svga, - struct pipe_resource *buf); + struct pipe_resource *buf, + unsigned tobind_flags); void svga_context_flush_buffers(struct svga_context *svga);