More specific fail() message for profiles without branching support. trunk
authorRyan C. Gordon <icculus@icculus.org>
Fri, 27 Jun 2008 17:54:57 -0400
branchtrunk
changeset 404 cdb4d7906026
parent 403 7c63507636ca
child 405 e2cffb40e8b8
More specific fail() message for profiles without branching support.
mojoshader.c
--- a/mojoshader.c	Fri Jun 27 17:10:41 2008 -0400
+++ b/mojoshader.c	Fri Jun 27 17:54:57 2008 -0400
@@ -4157,7 +4157,7 @@
 
     if (!ctx->support_nv2)  // no branching in stock ARB1.
     {
-        fail(ctx, "branching unsupported in this profile");
+        failf(ctx, "branching unsupported in %s profile", ctx->profile->name);
         return;
     } // if
 
@@ -4173,7 +4173,7 @@
     const char *scratch = allocate_ARB1_scratch_reg_name(ctx);
 
     if (!ctx->support_nv2)  // no branching in stock ARB1.
-        fail(ctx, "branching unsupported in this profile");
+        failf(ctx, "branching unsupported in %s profile", ctx->profile->name);
     else
     {
         // !!! FIXME: double-check this.
@@ -4470,7 +4470,7 @@
 
     else  // stock ARB1 has no branching.
     {
-        fail(ctx, "branching unsupported in this profile");
+        failf(ctx, "branching unsupported in %s profile", ctx->profile->name);
     } // else
 } // emit_ARB1_IF
 
@@ -4500,7 +4500,7 @@
 
     else  // stock ARB1 has no branching.
     {
-        fail(ctx, "branching unsupported in this profile");
+        failf(ctx, "branching unsupported in %s profile", ctx->profile->name);
     } // else
 } // emit_ARB1_ELSE
 
@@ -4521,7 +4521,7 @@
 
     else  // stock ARB1 has no branching.
     {
-        fail(ctx, "branching unsupported in this profile");
+        failf(ctx, "branching unsupported in %s profile", ctx->profile->name);
     } // else
 } // emit_ARB1_ENDIF
 
@@ -4543,7 +4543,7 @@
 
     else  // stock ARB1 has no branching.
     {
-        fail(ctx, "branching unsupported in this profile");
+        failf(ctx, "branching unsupported in %s profile", ctx->profile->name);
     } // else
 } // emit_ARB1_BREAK
 
@@ -4700,7 +4700,7 @@
 
     else  // stock ARB1 has no branching.
     {
-        fail(ctx, "branching unsupported in this profile");
+        failf(ctx, "branching unsupported in %s profile", ctx->profile->name);
     } // else
 } // emit_ARB1_IFC