To match the pp_ namespace convention.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
void ***shaders; /* Shaders in TGSI form */
unsigned int *filters; /* Active filter to filters.h mapping. */
- struct program *p;
+ struct pp_program *p;
bool fbos_init;
};
void pp_free(struct pp_queue_t *);
void pp_free_fbos(struct pp_queue_t *);
void pp_debug(const char *, ...);
-struct program *pp_init_prog(struct pp_queue_t *, struct pipe_context *pipe,
+struct pp_program *pp_init_prog(struct pp_queue_t *, struct pipe_context *pipe,
struct cso_context *);
void pp_init_fbos(struct pp_queue_t *, unsigned int, unsigned int);
void pp_blit(struct pipe_context *pipe,
struct pipe_resource *out, unsigned int n)
{
- struct program *p = ppq->p;
+ struct pp_program *p = ppq->p;
pp_filter_setup_in(p, in);
pp_filter_setup_out(p, out);
/* Helper functions for the filters */
-void pp_filter_setup_in(struct program *, struct pipe_resource *);
-void pp_filter_setup_out(struct program *, struct pipe_resource *);
-void pp_filter_end_pass(struct program *);
+void pp_filter_setup_in(struct pp_program *, struct pipe_resource *);
+void pp_filter_setup_out(struct pp_program *, struct pipe_resource *);
+void pp_filter_end_pass(struct pp_program *);
void *pp_tgsi_to_state(struct pipe_context *, const char *, bool,
const char *);
-void pp_filter_misc_state(struct program *);
-void pp_filter_draw(struct program *);
-void pp_filter_set_fb(struct program *);
-void pp_filter_set_clear_fb(struct program *);
+void pp_filter_misc_state(struct pp_program *);
+void pp_filter_draw(struct pp_program *);
+void pp_filter_set_fb(struct pp_program *);
+void pp_filter_set_clear_fb(struct pp_program *);
#endif
unsigned int h)
{
- struct program *p = ppq->p; /* The lazy will inherit the earth */
+ struct pp_program *p = ppq->p; /* The lazy will inherit the earth */
unsigned int i;
struct pipe_resource tmp_res;
struct pipe_resource *out, unsigned int n, bool iscolor)
{
- struct program *p = ppq->p;
+ struct pp_program *p = ppq->p;
struct pipe_depth_stencil_alpha_state mstencil;
struct pipe_sampler_view v_tmp, *arr[3];
#include "util/u_memory.h"
/** Initialize the internal details */
-struct program *
+struct pp_program *
pp_init_prog(struct pp_queue_t *ppq, struct pipe_context *pipe,
struct cso_context *cso)
{
- struct program *p;
+ struct pp_program *p;
pp_debug("Initializing program\n");
if (!pipe)
return NULL;
- p = CALLOC(1, sizeof(struct program));
+ p = CALLOC(1, sizeof(struct pp_program));
if (!p)
return NULL;
/**
* Internal control details.
*/
-struct program
+struct pp_program
{
struct pipe_screen *screen;
struct pipe_context *pipe;
/** Setup this resource as the filter input. */
void
-pp_filter_setup_in(struct program *p, struct pipe_resource *in)
+pp_filter_setup_in(struct pp_program *p, struct pipe_resource *in)
{
struct pipe_sampler_view v_tmp;
u_sampler_view_default_template(&v_tmp, in, in->format);
/** Setup this resource as the filter output. */
void
-pp_filter_setup_out(struct program *p, struct pipe_resource *out)
+pp_filter_setup_out(struct pp_program *p, struct pipe_resource *out)
{
p->surf.format = out->format;
/** Clean up the input and output set with the above. */
void
-pp_filter_end_pass(struct program *p)
+pp_filter_end_pass(struct pp_program *p)
{
pipe_surface_reference(&p->framebuffer.cbufs[0], NULL);
pipe_sampler_view_reference(&p->view, NULL);
/** Setup misc state for the filter. */
void
-pp_filter_misc_state(struct program *p)
+pp_filter_misc_state(struct pp_program *p)
{
cso_set_blend(p->cso, &p->blend);
cso_set_depth_stencil_alpha(p->cso, &p->depthstencil);
/** Draw with the filter to the set output. */
void
-pp_filter_draw(struct program *p)
+pp_filter_draw(struct pp_program *p)
{
util_draw_vertex_buffer(p->pipe, p->cso, p->vbuf, 0, 0,
PIPE_PRIM_QUADS, 4, 2);
/** Set the framebuffer as active. */
void
-pp_filter_set_fb(struct program *p)
+pp_filter_set_fb(struct pp_program *p)
{
cso_set_framebuffer(p->cso, &p->framebuffer);
}
/** Set the framebuffer as active and clear it. */
void
-pp_filter_set_clear_fb(struct program *p)
+pp_filter_set_clear_fb(struct pp_program *p)
{
cso_set_framebuffer(p->cso, &p->framebuffer);
p->pipe->clear(p->pipe, PIPE_CLEAR_COLOR, &p->clear_color, 0, 0);