mojoshader.c
branchtrunk
changeset 308 1970c3cd49ae
parent 306 053aaa9b4fb1
child 309 fe4e94d46cda
equal deleted inserted replaced
306:053aaa9b4fb1 308:1970c3cd49ae
  2347     // no-op is a no-op.  :)
  2347     // no-op is a no-op.  :)
  2348 } // emit_GLSL_NOP
  2348 } // emit_GLSL_NOP
  2349 
  2349 
  2350 static void emit_GLSL_MOV(Context *ctx)
  2350 static void emit_GLSL_MOV(Context *ctx)
  2351 {
  2351 {
  2352     const char *src0 = make_GLSL_srcarg_string_masked(ctx, 0);
  2352     const char *src0 = NULL;
       
  2353 
       
  2354     // oDepth is a float, not a vec4, but the writemask is .xyzw ... tweak it.
       
  2355     if (ctx->dest_arg.regtype == REG_TYPE_DEPTHOUT)
       
  2356         src0 = make_GLSL_srcarg_string_x(ctx, 0);
       
  2357     else
       
  2358         src0 = make_GLSL_srcarg_string_masked(ctx, 0);
       
  2359 
  2353     const char *code = make_GLSL_destarg_assign(ctx, "%s", src0);
  2360     const char *code = make_GLSL_destarg_assign(ctx, "%s", src0);
  2354     output_line(ctx, "%s", code);
  2361     output_line(ctx, "%s", code);
  2355 } // emit_GLSL_MOV
  2362 } // emit_GLSL_MOV
  2356 
  2363 
  2357 static void emit_GLSL_ADD(Context *ctx)
  2364 static void emit_GLSL_ADD(Context *ctx)