2012-10-26 19:09:30 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2016-01-10 03:41:52 +00:00
|
|
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
2012-10-26 19:09:30 +00: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 21:23:45 +00:00
|
|
|
#ifndef __D3D_RENDER_CHAIN_H
|
|
|
|
#define __D3D_RENDER_CHAIN_H
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2016-06-03 06:06:49 +00:00
|
|
|
#include <retro_common_api.h>
|
2016-05-10 17:03:53 +00:00
|
|
|
#include <libretro.h>
|
|
|
|
|
2015-11-22 21:25:01 +00:00
|
|
|
#include "../video_driver.h"
|
2015-01-12 22:42:50 +00:00
|
|
|
#include "../video_shader_parse.h"
|
2015-11-11 00:43:58 +00:00
|
|
|
#include "../video_state_tracker.h"
|
2015-11-17 07:20:10 +00:00
|
|
|
#include "../../defines/d3d_defines.h"
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2016-06-03 06:06:49 +00:00
|
|
|
RETRO_BEGIN_DECLS
|
2015-04-07 20:28:05 +00:00
|
|
|
|
2012-10-26 19:09:30 +00:00
|
|
|
struct LinkInfo
|
|
|
|
{
|
|
|
|
unsigned tex_w, tex_h;
|
2015-01-19 20:24:08 +00:00
|
|
|
struct video_shader_pass *pass;
|
2012-10-26 19:09:30 +00:00
|
|
|
};
|
|
|
|
|
2014-03-07 18:13:20 +00:00
|
|
|
#define MAX_VARIABLES 64
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
TEXTURES = 8,
|
|
|
|
TEXTURESMASK = TEXTURES - 1
|
|
|
|
};
|
|
|
|
|
2015-04-06 13:52:41 +00:00
|
|
|
typedef struct renderchain_driver
|
|
|
|
{
|
|
|
|
void (*chain_free)(void *data);
|
|
|
|
void *(*chain_new)(void);
|
2015-04-06 21:38:02 +00:00
|
|
|
bool (*reinit)(void *data, const void *info_data);
|
2015-04-06 13:52:41 +00:00
|
|
|
bool (*init)(void *data,
|
2015-04-06 16:20:08 +00:00
|
|
|
const void *video_info_data,
|
2015-04-06 13:52:41 +00:00
|
|
|
void *dev_data,
|
|
|
|
const void *final_viewport_data,
|
|
|
|
const void *info_data,
|
2015-11-11 01:42:15 +00:00
|
|
|
bool rgb32);
|
2015-04-06 13:52:41 +00:00
|
|
|
void (*set_final_viewport)(void *data,
|
|
|
|
void *renderchain_data, const void *viewport_data);
|
|
|
|
bool (*add_pass)(void *data, const void *info_data);
|
|
|
|
bool (*add_lut)(void *data,
|
|
|
|
const char *id, const char *path,
|
|
|
|
bool smooth);
|
|
|
|
void (*add_state_tracker)(void *data, void *tracker_data);
|
2015-04-07 01:46:27 +00:00
|
|
|
bool (*render)(void *chain_data, const void *data,
|
2015-04-06 13:52:41 +00:00
|
|
|
unsigned width, unsigned height, unsigned pitch, unsigned rotation);
|
|
|
|
void (*convert_geometry)(void *data, const void *info_data,
|
|
|
|
unsigned *out_width, unsigned *out_height,
|
|
|
|
unsigned width, unsigned height,
|
2015-04-06 16:15:33 +00:00
|
|
|
void *final_viewport);
|
2015-11-11 17:20:07 +00:00
|
|
|
void (*set_font_rect)(void *data, const void *param_data);
|
2015-11-11 00:34:00 +00:00
|
|
|
bool (*read_viewport)(void *data, uint8_t *buffer);
|
2015-11-11 00:43:58 +00:00
|
|
|
void (*viewport_info)(void *data, struct video_viewport *vp);
|
2015-04-06 13:52:41 +00:00
|
|
|
const char *ident;
|
|
|
|
} renderchain_driver_t;
|
|
|
|
|
2015-04-06 13:59:53 +00:00
|
|
|
extern renderchain_driver_t cg_d3d9_renderchain;
|
|
|
|
extern renderchain_driver_t xdk_renderchain;
|
2015-04-06 14:52:39 +00:00
|
|
|
extern renderchain_driver_t null_renderchain;
|
2015-04-06 13:52:41 +00:00
|
|
|
|
2015-04-06 14:55:05 +00:00
|
|
|
bool renderchain_init_first(const renderchain_driver_t **renderchain_driver,
|
|
|
|
void **renderchain_handle);
|
|
|
|
|
2016-06-03 06:06:49 +00:00
|
|
|
RETRO_END_DECLS
|
2015-04-07 20:28:05 +00:00
|
|
|
|
2012-10-26 19:09:30 +00:00
|
|
|
#endif
|
|
|
|
|