Rename gfx_ structs

This commit is contained in:
twinaphex 2016-05-10 02:39:09 +02:00
parent 2ebb92834c
commit dde471e001
8 changed files with 29 additions and 30 deletions

View File

@ -181,8 +181,8 @@ typedef struct gl
GLuint texture[GFX_MAX_TEXTURES];
unsigned tex_index; /* For use with PREV. */
unsigned textures;
struct gfx_tex_info tex_info;
struct gfx_tex_info prev_info[GFX_MAX_TEXTURES];
struct video_tex_info tex_info;
struct video_tex_info prev_info[GFX_MAX_TEXTURES];
GLuint tex_mag_filter;
GLuint tex_min_filter;
bool tex_mipmap;

View File

@ -1074,7 +1074,7 @@ static bool d3d_construct(d3d_video_t *d3d,
static void d3d_set_rotation(void *data, unsigned rot)
{
d3d_video_t *d3d = (d3d_video_t*)data;
struct gfx_ortho ortho = {0, 1, 0, 1, -1, 1};
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
if (!d3d)
return;

View File

@ -859,7 +859,7 @@ static bool gl_init_hw_render(gl_t *gl, unsigned width, unsigned height)
#endif
static void gl_set_projection(gl_t *gl,
struct gfx_ortho *ortho, bool allow_rotate)
struct video_ortho *ortho, bool allow_rotate)
{
math_matrix_4x4 rot;
@ -885,7 +885,7 @@ static void gl_set_viewport(void *data, unsigned viewport_width,
int x = 0;
int y = 0;
float device_aspect = (float)viewport_width / viewport_height;
struct gfx_ortho ortho = {0, 1, 0, 1, -1, 1};
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
settings_t *settings = config_get_ptr();
gl_t *gl = (gl_t*)data;
@ -982,7 +982,7 @@ static void gl_set_viewport(void *data, unsigned viewport_width,
static void gl_set_rotation(void *data, unsigned rotation)
{
gl_t *gl = (gl_t*)data;
struct gfx_ortho ortho = {0, 1, 0, 1, -1, 1};
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
if (!gl)
return;
@ -1117,8 +1117,8 @@ static void gl_check_fbo_dimensions(gl_t *gl)
}
static void gl_frame_fbo(gl_t *gl, uint64_t frame_count,
const struct gfx_tex_info *tex_info,
const struct gfx_tex_info *feedback_info)
const struct video_tex_info *tex_info,
const struct video_tex_info *feedback_info)
{
unsigned mip_level;
video_shader_ctx_mvp_t mvp;
@ -1127,8 +1127,8 @@ static void gl_frame_fbo(gl_t *gl, uint64_t frame_count,
video_shader_ctx_info_t shader_info;
unsigned width, height;
const struct video_fbo_rect *prev_rect;
struct gfx_tex_info *fbo_info;
struct gfx_tex_info fbo_tex_info[GFX_MAX_SHADERS];
struct video_tex_info *fbo_info;
struct video_tex_info fbo_tex_info[GFX_MAX_SHADERS];
int i;
GLfloat xamt, yamt;
unsigned fbo_tex_info_cnt = 0;
@ -1599,7 +1599,7 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame,
}
static INLINE void gl_set_prev_texture(gl_t *gl,
const struct gfx_tex_info *tex_info)
const struct video_tex_info *tex_info)
{
memmove(gl->prev_info + 1, gl->prev_info,
sizeof(*tex_info) * (gl->textures - 1));
@ -1757,7 +1757,7 @@ static bool gl_frame(void *data, const void *frame,
video_shader_ctx_coords_t coords;
video_shader_ctx_params_t params;
unsigned width, height;
struct gfx_tex_info feedback_info;
struct video_tex_info feedback_info;
video_shader_ctx_info_t shader_info;
static struct retro_perf_counter frame_run = {0};
gl_t *gl = (gl_t*)data;

View File

@ -1191,7 +1191,7 @@ static bool vulkan_set_shader(void *data,
}
static void vulkan_set_projection(vk_t *vk,
struct gfx_ortho *ortho, bool allow_rotate)
struct video_ortho *ortho, bool allow_rotate)
{
math_matrix_4x4 rot;
@ -1212,7 +1212,7 @@ static void vulkan_set_projection(vk_t *vk,
static void vulkan_set_rotation(void *data, unsigned rotation)
{
vk_t *vk = (vk_t*)data;
struct gfx_ortho ortho = {0, 1, 0, 1, -1, 1};
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
if (!vk)
return;
@ -1243,7 +1243,7 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width,
int x = 0;
int y = 0;
float device_aspect = (float)viewport_width / viewport_height;
struct gfx_ortho ortho = {0, 1, 0, 1, -1, 1};
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
settings_t *settings = config_get_ptr();
vk_t *vk = (vk_t*)data;

View File

@ -289,7 +289,7 @@ fallback:
static void gl_cg_set_texture_info(
cg_shader_data_t *cg,
const struct cg_fbo_params *params,
const struct gfx_tex_info *info)
const struct video_tex_info *info)
{
unsigned i;
struct uniform_cg uniform_data[4];
@ -348,10 +348,10 @@ static void gl_cg_set_params(void *data, void *shader_data,
struct uniform_cg uniform_data[10];
struct uniform_info uniform_params[10] = {{0}};
unsigned uniform_count = 0;
const struct gfx_tex_info *info = (const struct gfx_tex_info*)_info;
const struct gfx_tex_info *prev_info = (const struct gfx_tex_info*)_prev_info;
const struct gfx_tex_info *feedback_info = (const struct gfx_tex_info*)_feedback_info;
const struct gfx_tex_info *fbo_info = (const struct gfx_tex_info*)_fbo_info;
const struct video_tex_info *info = (const struct video_tex_info*)_info;
const struct video_tex_info *prev_info = (const struct video_tex_info*)_prev_info;
const struct video_tex_info *feedback_info = (const struct video_tex_info*)_feedback_info;
const struct video_tex_info *fbo_info = (const struct video_tex_info*)_fbo_info;
cg_shader_data_t *cg = (cg_shader_data_t*)shader_data;
if (!cg || (cg->active_idx == 0))

View File

@ -1019,10 +1019,10 @@ static void gl_glsl_set_params(void *data, void *shader_data,
unsigned texunit = 1;
const struct shader_uniforms *uni = NULL;
size_t size = 0, attribs_size = 0;
const struct gfx_tex_info *info = (const struct gfx_tex_info*)_info;
const struct gfx_tex_info *prev_info = (const struct gfx_tex_info*)_prev_info;
const struct gfx_tex_info *feedback_info = (const struct gfx_tex_info*)_feedback_info;
const struct gfx_tex_info *fbo_info = (const struct gfx_tex_info*)_fbo_info;
const struct video_tex_info *info = (const struct video_tex_info*)_info;
const struct video_tex_info *prev_info = (const struct video_tex_info*)_prev_info;
const struct video_tex_info *feedback_info = (const struct video_tex_info*)_feedback_info;
const struct video_tex_info *fbo_info = (const struct video_tex_info*)_fbo_info;
struct glsl_attrib *attr = (struct glsl_attrib*)attribs;
glsl_shader_data_t *glsl = (glsl_shader_data_t*)shader_data;

View File

@ -124,10 +124,9 @@ static void hlsl_set_params(void *data, void *shader_data,
{
d3d_video_t *d3d = (d3d_video_t*)data;
LPDIRECT3DDEVICE d3d_device_ptr = (LPDIRECT3DDEVICE)d3d->dev;
const struct gfx_tex_info *info = (const struct gfx_tex_info*)_info;
const struct gfx_tex_info *prev_info = (const struct gfx_tex_info*)_prev_info;
(void)_feedback_info;
const struct gfx_tex_info *fbo_info = (const struct gfx_tex_info*)_fbo_info;
const struct video_tex_info *info = (const struct video_tex_info*)_info;
const struct video_tex_info *prev_info = (const struct video_tex_info*)_prev_info;
const struct video_tex_info *fbo_info = (const struct video_tex_info*)_fbo_info;
hlsl_shader_data_t *hlsl = (hlsl_shader_data_t*)shader_data;
if (!hlsl)

View File

@ -36,7 +36,7 @@ struct video_fbo_rect
unsigned height;
};
struct gfx_ortho
struct video_ortho
{
float left;
float right;
@ -46,7 +46,7 @@ struct gfx_ortho
float zfar;
};
struct gfx_tex_info
struct video_tex_info
{
unsigned int tex;
float input_size[2];