Path: blob/21.2-virgl/src/gallium/auxiliary/postprocess/postprocess.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 POSTPROCESS_H28#define POSTPROCESS_H2930#include "pipe/p_state.h"3132#ifdef __cplusplus33extern "C" {34#endif3536struct cso_context;37struct st_context_iface;3839struct pp_queue_t; /* Forward definition */40struct pp_program;4142/* Less typing later on */43typedef void (*pp_func) (struct pp_queue_t *, struct pipe_resource *,44struct pipe_resource *, unsigned int);4546/* Main functions */4748/**49* Note enabled is an array of values, one per filter stage.50* Zero indicates the stage is disabled. Non-zero indicates the51* stage is enabled. For some stages, the value controls quality.52*/53struct pp_queue_t *pp_init(struct pipe_context *pipe,54const unsigned int *enabled,55struct cso_context *,56struct st_context_iface *st);5758void pp_run(struct pp_queue_t *, struct pipe_resource *,59struct pipe_resource *, struct pipe_resource *);60void pp_free(struct pp_queue_t *);6162void pp_init_fbos(struct pp_queue_t *, unsigned int, unsigned int);636465/* The filters */6667void pp_nocolor(struct pp_queue_t *, struct pipe_resource *,68struct pipe_resource *, unsigned int);6970void pp_jimenezmlaa(struct pp_queue_t *, struct pipe_resource *,71struct pipe_resource *, unsigned int);72void pp_jimenezmlaa_color(struct pp_queue_t *, struct pipe_resource *,73struct pipe_resource *, unsigned int);7475/* The filter init functions */7677bool pp_celshade_init(struct pp_queue_t *, unsigned int, unsigned int);7879bool pp_nored_init(struct pp_queue_t *, unsigned int, unsigned int);80bool pp_nogreen_init(struct pp_queue_t *, unsigned int, unsigned int);81bool pp_noblue_init(struct pp_queue_t *, unsigned int, unsigned int);8283bool pp_jimenezmlaa_init(struct pp_queue_t *, unsigned int, unsigned int);84bool pp_jimenezmlaa_init_color(struct pp_queue_t *, unsigned int,85unsigned int);8687/* The filter free functions */8889void pp_celshade_free(struct pp_queue_t *, unsigned int);90void pp_nocolor_free(struct pp_queue_t *, unsigned int);91void pp_jimenezmlaa_free(struct pp_queue_t *, unsigned int);929394#ifdef __cplusplus95}96#endif9798#endif99100101