Navigation Menu

Skip to content

Commit

Permalink
Merged changes into my iBook's hg repo.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed May 10, 2008
2 parents 573cc3e + e87b659 commit 220cc38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions mojoshader.c
Expand Up @@ -388,9 +388,9 @@ static inline int out_of_memory(Context *ctx)
return FAIL;
} // out_of_memory

static inline void *Malloc(Context *ctx, const int len)
static inline void *Malloc(Context *ctx, const size_t len)
{
void *retval = ctx->malloc(len, ctx->malloc_data);
void *retval = ctx->malloc((int) len, ctx->malloc_data);
if (retval == NULL)
out_of_memory(ctx);
return retval;
Expand Down Expand Up @@ -3870,7 +3870,7 @@ static void state_DCL(Context *ctx)
else if (shader_is_pixel(ctx))
{
if (regtype == REG_TYPE_TEXTURE)
add_attribute_register(ctx, regtype, regnum, 0, 0, writemask);
add_attribute_register(ctx, regtype, regnum, MOJOSHADER_USAGE_UNKNOWN, 0, writemask);
else if (regtype == REG_TYPE_SAMPLER)
{
const TextureType ttype = (const TextureType) ctx->dwords[0];
Expand Down
6 changes: 3 additions & 3 deletions mojoshader_opengl.c
Expand Up @@ -177,7 +177,7 @@ static void internal_free(void *ptr, void *d) { free(ptr); }

static inline void *Malloc(const size_t len)
{
void *retval = ctx->malloc_fn(len, ctx->malloc_data);
void *retval = ctx->malloc_fn((int) len, ctx->malloc_data);
if (retval == NULL)
set_error("out of memory");
return retval;
Expand Down Expand Up @@ -626,7 +626,7 @@ MOJOSHADER_glProgram *MOJOSHADER_glLinkProgram(MOJOSHADER_glShader *vshader,
MOJOSHADER_glProgram *retval = NULL;
const GLhandleARB program = ctx->glCreateProgramObject();
int numregs = 0;
uint32 const_count = 0;
int const_count = 0;

if (vshader != NULL) ctx->glAttachObject(program, vshader->handle);
if (pshader != NULL) ctx->glAttachObject(program, pshader->handle);
Expand Down Expand Up @@ -698,7 +698,7 @@ MOJOSHADER_glProgram *MOJOSHADER_glLinkProgram(MOJOSHADER_glShader *vshader,
retval->constants = (GLfloat *) Malloc(sizeof (GLfloat) * const_count);
if (retval->constants == NULL)
goto link_program_fail;
retval->constant_count = const_count;
retval->constant_count = (uint32) const_count;
} // if

return retval;
Expand Down

0 comments on commit 220cc38

Please sign in to comment.