RetroArch/gfx/d3d/render_chain_driver.h

79 lines
2.2 KiB
C
Raw Normal View History

2012-10-26 21:09:30 +02:00
/* RetroArch - A frontend for libretro.
2014-01-01 01:50:59 +01:00
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
2015-01-07 18:06:50 +01:00
* Copyright (C) 2011-2015 - Daniel De Matteis
2012-10-26 21:09:30 +02:00
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
2015-01-07 22:23:45 +01:00
#ifndef __D3D_RENDER_CHAIN_H
#define __D3D_RENDER_CHAIN_H
2012-10-26 21:09:30 +02:00
2015-01-07 22:23:45 +01:00
#include "d3d.h"
2015-01-12 16:00:13 +01:00
#include "../video_state_tracker.h"
#include "../video_shader_parse.h"
2015-04-05 16:48:22 +02:00
#include "../../libretro.h"
2012-10-26 21:09:30 +02:00
struct LinkInfo
{
unsigned tex_w, tex_h;
2015-01-19 21:24:08 +01:00
struct video_shader_pass *pass;
2012-10-26 21:09:30 +02:00
};
#define MAX_VARIABLES 64
enum
{
TEXTURES = 8,
TEXTURESMASK = TEXTURES - 1
};
void renderchain_free(void *data);
2014-09-08 20:08:49 +02:00
void *renderchain_new(void);
void renderchain_deinit(void *data);
2015-04-05 18:01:33 +02:00
void renderchain_deinit_shader(void);
bool renderchain_init_shader(void *data);
2015-04-05 23:19:10 +02:00
bool renderchain_init(void *data,
const video_info_t *video_info,
2015-04-05 23:54:28 +02:00
void *dev_data,
const void *final_viewport_data,
2015-04-05 01:05:51 +02:00
const void *info_data,
2015-04-05 16:48:22 +02:00
unsigned fmt);
2014-09-08 20:08:49 +02:00
2015-04-05 18:33:42 +02:00
void renderchain_set_final_viewport(void *data,
void *renderchain_data, const void *viewport_data);
2014-09-08 20:08:49 +02:00
2015-04-05 00:44:54 +02:00
bool renderchain_add_pass(void *data, const void *info_data);
2014-09-08 20:08:49 +02:00
2015-04-05 02:31:24 +02:00
bool renderchain_add_lut(void *data,
const char *id, const char *path,
bool smooth);
2014-09-08 20:08:49 +02:00
2015-04-05 01:05:51 +02:00
void renderchain_add_state_tracker(void *data, void *tracker_data);
2014-09-08 20:08:49 +02:00
bool renderchain_render(void *chain_data, const void *data,
unsigned width, unsigned height, unsigned pitch, unsigned rotation);
2014-09-08 20:08:49 +02:00
2015-04-05 00:44:54 +02:00
void renderchain_convert_geometry(void *data, const void *info_data,
unsigned *out_width, unsigned *out_height,
unsigned width, unsigned height,
D3DVIEWPORT *final_viewport);
2014-09-08 20:08:49 +02:00
2015-04-05 00:59:02 +02:00
bool renderchain_init_shader_fvf(void *data, void *pass_data);
2014-09-08 20:08:49 +02:00
2012-10-26 21:09:30 +02:00
#endif