mojoshader.c
branchtrunk
changeset 183 2aacea2477f6
parent 182 09e287c6a111
child 184 5d196ad56b25
equal deleted inserted replaced
182:09e287c6a111 183:2aacea2477f6
  1824     swiz_str[i] = '\0';
  1824     swiz_str[i] = '\0';
  1825     assert(i < sizeof (swiz_str));
  1825     assert(i < sizeof (swiz_str));
  1826 
  1826 
  1827     char *retval = get_scratch_buffer(ctx);
  1827     char *retval = get_scratch_buffer(ctx);
  1828     snprintf(retval, SCRATCH_BUFFER_SIZE, "%s%s%s%s%s",
  1828     snprintf(retval, SCRATCH_BUFFER_SIZE, "%s%s%s%s%s",
  1829              premod_str, regtype_str, regnum_str, postmod_str, swiz_str);
  1829              premod_str, regtype_str, regnum_str, swiz_str, postmod_str);
  1830     // !!! FIXME: make sure the scratch buffer was large enough.
  1830     // !!! FIXME: make sure the scratch buffer was large enough.
  1831     return retval;
  1831     return retval;
  1832 } // make_GLSL_srcarg_string
  1832 } // make_GLSL_srcarg_string
  1833 
  1833 
  1834 static inline char *make_GLSL_srcarg_string_x(Context *ctx, const int idx)
  1834 static inline char *make_GLSL_srcarg_string_x(Context *ctx, const int idx)