mojoshader.c
branchtrunk
changeset 309 fe4e94d46cda
parent 308 1970c3cd49ae
parent 307 42f6a7ba69e2
child 310 d323e04e62f7
--- a/mojoshader.c	Fri May 09 23:06:12 2008 -0400
+++ b/mojoshader.c	Fri May 09 23:12:51 2008 -0400
@@ -388,9 +388,9 @@
     return FAIL;
 } // out_of_memory
 
-static inline void *Malloc(Context *ctx, const int len)
-{
-    void *retval = ctx->malloc(len, ctx->malloc_data);
+static inline void *Malloc(Context *ctx, const size_t len)
+{
+    void *retval = ctx->malloc((int) len, ctx->malloc_data);
     if (retval == NULL)
         out_of_memory(ctx);
     return retval;
@@ -3870,7 +3870,7 @@
     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];