Path: blob/21.2-virgl/src/gallium/auxiliary/postprocess/pp_private.h
4561 views
/**************************************************************************1*2* Copyright 2011 Lauri Kasanen3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627#ifndef PP_PRIVATE_H28#define PP_PRIVATE_H293031#include "postprocess.h"32#include "cso_cache/cso_context.h"333435/**36* Internal control details.37*/38struct pp_program39{40struct pipe_screen *screen;41struct pipe_context *pipe;42struct cso_context *cso;43struct st_context_iface *st;4445struct pipe_blend_state blend;46struct pipe_depth_stencil_alpha_state depthstencil;47struct pipe_rasterizer_state rasterizer;48struct pipe_sampler_state sampler; /* bilinear */49struct pipe_sampler_state sampler_point; /* point */50struct pipe_viewport_state viewport;51struct pipe_framebuffer_state framebuffer;52struct cso_velems_state velem;5354union pipe_color_union clear_color;5556void *passvs;5758struct pipe_resource *vbuf;59struct pipe_surface surf;60struct pipe_sampler_view *view;61};62636465/**66* The main post-processing queue.67*/68struct pp_queue_t69{70pp_func *pp_queue; /* An array of pp_funcs */71unsigned int n_filters; /* Number of enabled filters */7273struct pipe_resource *tmp[2]; /* Two temp FBOs for the queue */74struct pipe_resource *inner_tmp[3]; /* Three for filter use */7576unsigned int n_tmp, n_inner_tmp;7778struct pipe_resource *depth; /* depth of original input */79struct pipe_resource *stencil; /* stencil shared by inner_tmps */80struct pipe_resource *areamaptex; /* MLAA area map texture */8182struct pipe_surface *tmps[2], *inner_tmps[3], *stencils;8384void ***shaders; /* Shaders in TGSI form */85unsigned int *filters; /* Active filter to filters.h mapping. */86struct pp_program *p;8788bool fbos_init;89};909192void pp_free_fbos(struct pp_queue_t *);9394void pp_debug(const char *, ...);9596struct pp_program *pp_init_prog(struct pp_queue_t *, struct pipe_context *pipe,97struct cso_context *, struct st_context_iface *st);9899void pp_blit(struct pipe_context *pipe,100struct pipe_resource *src_tex,101int srcX0, int srcY0,102int srcX1, int srcY1,103int srcZ0,104struct pipe_surface *dst,105int dstX0, int dstY0,106int dstX1, int dstY1);107108109#endif /* PP_PRIVATE_H */110111112