Path: blob/21.2-virgl/src/gallium/frontends/glx/xlib/xm_st.h
4561 views
/*1* Mesa 3-D graphics library2*3* Copyright (C) 2010 LunarG Inc.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the "Software"),7* to deal in the Software without restriction, including without limitation8* the rights to use, copy, modify, merge, publish, distribute, sublicense,9* and/or sell copies of the Software, and to permit persons to whom the10* Software is furnished to do so, subject to the following conditions:11*12* The above copyright notice and this permission notice shall be included13* in all copies or substantial portions of the Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL18* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING20* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER21* DEALINGS IN THE SOFTWARE.22*23* Authors:24* Chia-I Wu <[email protected]>25*/2627#ifndef _XM_ST_H_28#define _XM_ST_H_2930#include "pipe/p_compiler.h"31#include "frontend/api.h"3233#include "xm_api.h"3435struct st_framebuffer_iface *36xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b);3738void39xmesa_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi);4041struct pipe_resource *42xmesa_get_framebuffer_resource(struct st_framebuffer_iface *stfbi,43enum st_attachment_type att);4445void46xmesa_swap_st_framebuffer(struct st_framebuffer_iface *stfbi);4748void49xmesa_copy_st_framebuffer(struct st_framebuffer_iface *stfbi,50enum st_attachment_type src,51enum st_attachment_type dst,52int x, int y, int w, int h);5354struct pipe_resource*55xmesa_get_attachment(struct st_framebuffer_iface *stfbi,56enum st_attachment_type st_attachment);5758struct pipe_context*59xmesa_get_context(struct st_framebuffer_iface* stfbi);6061bool62xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,63unsigned width, unsigned height,64unsigned mask);65#endif /* _XM_ST_H_ */666768