Emit vs_1_1 properly (thanks, Aras!).
authorRyan C. Gordon <icculus@icculus.org>
Wed, 30 Dec 2009 03:32:54 -0500
changeset 804 b5dca9b2a6e8
parent 803 cfd14c5f187a
child 805 49320a1f5e90
Emit vs_1_1 properly (thanks, Aras!).
mojoshader.c
--- a/mojoshader.c	Tue Dec 29 22:36:27 2009 +0200
+++ b/mojoshader.c	Wed Dec 30 03:32:54 2009 -0500
@@ -1071,8 +1071,8 @@
 
     if (minor == 0xFF)
         strcpy(minor_str, "sw");
-    else if (minor == 0x1)  // apparently this is "vs_2_x". Weird.
-        strcpy(minor_str, "x");
+    else if ((major > 1) && (minor == 1))
+        strcpy(minor_str, "x");  // for >= SM2, apparently this is "x". Weird.
     else
         snprintf(minor_str, sizeof (minor_str), "%u", (uint) minor);