mojoshader.c
branchtrunk
changeset 231 be53929fe38f
parent 214 a4346bb8608b
child 232 dbb39e20ed9a
equal deleted inserted replaced
230:396aa372c7d8 231:be53929fe38f
  1845     swiz_str[i] = '\0';
  1845     swiz_str[i] = '\0';
  1846     assert(i < sizeof (swiz_str));
  1846     assert(i < sizeof (swiz_str));
  1847 
  1847 
  1848     const char *shader_type_str = get_shader_type_string(ctx);
  1848     const char *shader_type_str = get_shader_type_string(ctx);
  1849     char *retval = get_scratch_buffer(ctx);
  1849     char *retval = get_scratch_buffer(ctx);
  1850     snprintf(retval, SCRATCH_BUFFER_SIZE, "%s_%s%s%s%s%s", shader_type_str,
  1850     snprintf(retval, SCRATCH_BUFFER_SIZE, "%s%s_%s%s%s%s", premod_str,
  1851              premod_str, regtype_str, regnum_str, swiz_str, postmod_str);
  1851              shader_type_str, regtype_str, regnum_str, swiz_str, postmod_str);
  1852     // !!! FIXME: make sure the scratch buffer was large enough.
  1852     // !!! FIXME: make sure the scratch buffer was large enough.
  1853     return retval;
  1853     return retval;
  1854 } // make_GLSL_srcarg_string
  1854 } // make_GLSL_srcarg_string
  1855 
  1855 
  1856 static inline char *make_GLSL_srcarg_string_x(Context *ctx, const int idx)
  1856 static inline char *make_GLSL_srcarg_string_x(Context *ctx, const int idx)