equal
deleted
inserted
replaced
386 if (ctx->failstr == NULL) |
386 if (ctx->failstr == NULL) |
387 ctx->failstr = out_of_mem_str; // fail() would call malloc(). |
387 ctx->failstr = out_of_mem_str; // fail() would call malloc(). |
388 return FAIL; |
388 return FAIL; |
389 } // out_of_memory |
389 } // out_of_memory |
390 |
390 |
391 static inline void *Malloc(Context *ctx, const int len) |
391 static inline void *Malloc(Context *ctx, const size_t len) |
392 { |
392 { |
393 void *retval = ctx->malloc(len, ctx->malloc_data); |
393 void *retval = ctx->malloc((int) len, ctx->malloc_data); |
394 if (retval == NULL) |
394 if (retval == NULL) |
395 out_of_memory(ctx); |
395 out_of_memory(ctx); |
396 return retval; |
396 return retval; |
397 } // Malloc |
397 } // Malloc |
398 |
398 |
3861 } // if |
3861 } // if |
3862 |
3862 |
3863 else if (shader_is_pixel(ctx)) |
3863 else if (shader_is_pixel(ctx)) |
3864 { |
3864 { |
3865 if (regtype == REG_TYPE_TEXTURE) |
3865 if (regtype == REG_TYPE_TEXTURE) |
3866 add_attribute_register(ctx, regtype, regnum, 0, 0, writemask); |
3866 add_attribute_register(ctx, regtype, regnum, MOJOSHADER_USAGE_UNKNOWN, 0, writemask); |
3867 else if (regtype == REG_TYPE_SAMPLER) |
3867 else if (regtype == REG_TYPE_SAMPLER) |
3868 { |
3868 { |
3869 const TextureType ttype = (const TextureType) ctx->dwords[0]; |
3869 const TextureType ttype = (const TextureType) ctx->dwords[0]; |
3870 switch (ttype) |
3870 switch (ttype) |
3871 { |
3871 { |