MAX_SHADERS should only be defined in gl_common.h

This commit is contained in:
twinaphex 2015-06-22 21:09:18 +02:00
parent e4cea13c4f
commit 682867b9a1
4 changed files with 14 additions and 22 deletions

View File

@ -981,7 +981,7 @@ static void gl_frame_fbo(gl_t *gl, uint64_t frame_count,
const struct gl_fbo_rect *prev_rect;
const struct gl_fbo_rect *rect;
struct gl_tex_info *fbo_info;
struct gl_tex_info fbo_tex_info[MAX_SHADERS];
struct gl_tex_info fbo_tex_info[GFX_MAX_SHADERS];
int i;
GLfloat xamt, yamt;
unsigned fbo_tex_info_cnt = 0;

View File

@ -24,6 +24,7 @@
#include <formats/image.h>
#include "../video_context_driver.h"
#include "../video_shader_driver.h"
#include "../video_shader_parse.h"
#include <retro_inline.h>
#ifdef HAVE_CONFIG_H
@ -102,14 +103,6 @@
#endif
#ifndef MAX_SHADERS
#define MAX_SHADERS 16
#endif
#ifndef MAX_TEXTURES
#define MAX_TEXTURES 8
#endif
#if defined(HAVE_PSGL)
#define RARCH_GL_INTERNAL_FORMAT32 GL_ARGB_SCE
#define RARCH_GL_INTERNAL_FORMAT16 GL_RGB5 /* TODO: Verify if this is really 565 or just 555. */
@ -251,11 +244,11 @@ typedef struct gl
const shader_backend_t *shader;
bool vsync;
GLuint texture[MAX_TEXTURES];
GLuint texture[GFX_MAX_TEXTURES];
unsigned tex_index; /* For use with PREV. */
unsigned textures;
struct gl_tex_info tex_info;
struct gl_tex_info prev_info[MAX_TEXTURES];
struct gl_tex_info prev_info[GFX_MAX_TEXTURES];
GLuint tex_mag_filter;
GLuint tex_min_filter;
bool tex_mipmap;
@ -267,15 +260,15 @@ typedef struct gl
#ifdef HAVE_FBO
/* Render-to-texture, multipass shaders. */
GLuint fbo[MAX_SHADERS];
GLuint fbo_texture[MAX_SHADERS];
struct gl_fbo_rect fbo_rect[MAX_SHADERS];
struct gfx_fbo_scale fbo_scale[MAX_SHADERS];
GLuint fbo[GFX_MAX_SHADERS];
GLuint fbo_texture[GFX_MAX_SHADERS];
struct gl_fbo_rect fbo_rect[GFX_MAX_SHADERS];
struct gfx_fbo_scale fbo_scale[GFX_MAX_SHADERS];
int fbo_pass;
bool fbo_inited;
GLuint hw_render_fbo[MAX_TEXTURES];
GLuint hw_render_depth[MAX_TEXTURES];
GLuint hw_render_fbo[GFX_MAX_TEXTURES];
GLuint hw_render_depth[GFX_MAX_TEXTURES];
bool hw_render_fbo_init;
bool hw_render_depth_init;
bool has_fp_fbo;
@ -296,8 +289,8 @@ typedef struct gl
struct video_viewport vp;
unsigned vp_out_width;
unsigned vp_out_height;
unsigned last_width[MAX_TEXTURES];
unsigned last_height[MAX_TEXTURES];
unsigned last_width[GFX_MAX_TEXTURES];
unsigned last_height[GFX_MAX_TEXTURES];
unsigned tex_w, tex_h;
math_matrix_4x4 mvp, mvp_no_rot;

View File

@ -113,7 +113,7 @@ struct cg_fbo_params
};
#define MAX_VARIABLES 64
#define PREV_TEXTURES (MAX_TEXTURES - 1)
#define PREV_TEXTURES (GFX_MAX_TEXTURES - 1)
struct cg_program
{

View File

@ -39,8 +39,7 @@
#define BORDER_FUNC GL_CLAMP_TO_BORDER
#endif
#define PREV_TEXTURES (MAX_TEXTURES - 1)
#define PREV_TEXTURES (GFX_MAX_TEXTURES - 1)
/* Cache the VBO. */
struct cache_vbo