Skip to content

Commit

Permalink
Replaced some constants with #defines.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 14, 2009
1 parent 591e341 commit c7e26ed
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions mojoshader_opengl.c
Expand Up @@ -105,6 +105,11 @@ typedef WINGDIAPI GLenum (APIENTRYP PFNGLGETERRORPROC) (void);
typedef WINGDIAPI void (APIENTRYP PFNGLENABLEPROC) (GLenum cap);
typedef WINGDIAPI void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap);

// Max entries for each register file type...
#define MAX_REG_FILE_F 8192
#define MAX_REG_FILE_I 2047
#define MAX_REG_FILE_B 2047

struct MOJOSHADER_glContext
{
// Allocators...
Expand All @@ -114,12 +119,12 @@ struct MOJOSHADER_glContext

// The constant register files...
// Man, it kills me how much memory this takes...
GLfloat vs_reg_file_f[8192 * 4];
GLint vs_reg_file_i[2047 * 4];
uint8 vs_reg_file_b[2047];
GLfloat ps_reg_file_f[8192 * 4];
GLint ps_reg_file_i[2047 * 4];
uint8 ps_reg_file_b[2047];
GLfloat vs_reg_file_f[MAX_REG_FILE_F * 4];
GLint vs_reg_file_i[MAX_REG_FILE_I * 4];
uint8 vs_reg_file_b[MAX_REG_FILE_B];
GLfloat ps_reg_file_f[MAX_REG_FILE_F * 4];
GLint ps_reg_file_i[MAX_REG_FILE_I * 4];
uint8 ps_reg_file_b[MAX_REG_FILE_B];
GLuint sampler_reg_file[16];

// GL stuff...
Expand Down

0 comments on commit c7e26ed

Please sign in to comment.