diff options
author | Michal Krol <[email protected]> | 2005-04-15 10:19:27 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2005-04-15 10:19:27 +0000 |
commit | 35725a92be64ecb2b5fd7ced66b585b496e50a54 (patch) | |
tree | 719cfad2c047c9b38632382cdf1c51b4e34955e1 /src/mesa/shader/slang | |
parent | d8aa5ffed5986587e5b93ca802c79d28be68aa8d (diff) |
change __asm statement semantics
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/library/gc_to_string.py | 2 | ||||
-rwxr-xr-x | src/mesa/shader/slang/library/slang_core.gc | 16 | ||||
-rw-r--r-- | src/mesa/shader/slang/library/slang_core_gc.h | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/shader/slang/library/gc_to_string.py b/src/mesa/shader/slang/library/gc_to_string.py index ecbfbb078ac..a9d399fc177 100644 --- a/src/mesa/shader/slang/library/gc_to_string.py +++ b/src/mesa/shader/slang/library/gc_to_string.py @@ -1,4 +1,4 @@ -#!/usr/bin/python
+#!/usr/bin/env python
# Mesa 3-D graphics library
# Version: 6.3
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 558ca5440fa..fdba7c636d3 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -17,8 +17,8 @@ // a list of zero or more source variable identifiers. A variable identifier is a variable name // declared earlier in the code (as a function parameter, local or global variable). // An instruction name designates an instruction that must be exported by the implementation. -// Each instruction receives data from destination and source variable identifiers and returns -// data in the destination variable identifier. +// Each instruction receives data from source variable identifiers and returns data in the +// destination variable identifier. // // It is up to the implementation how to define a particular operator or constructor. If it is // expected to being used rarely, it can be defined in terms of other operators and constructors, @@ -435,7 +435,7 @@ void __operator = (out mat4 m, const mat4 n) { // void __operator += (inout float a, const float b) { - __asm float_add a, b; + __asm float_add a, a, b; } void __operator -= (inout float a, const float b) { @@ -443,11 +443,11 @@ void __operator -= (inout float a, const float b) { } void __operator *= (inout float a, const float b) { - __asm float_multiply a, b; + __asm float_multiply a, a, b; } void __operator /= (inout float a, const float b) { - __asm float_divide a, b; + __asm float_divide a, a, b; } void __operator += (inout int x, const int y) { @@ -1309,8 +1309,8 @@ mat4 __operator * (const mat4 m, const mat4 n) { // float __operator - (const float a) { - float c = a; - __asm float_negate c; + float c; + __asm float_negate c, a; return c; } @@ -1740,4 +1740,4 @@ bool __operator ^^ (const bool a, const bool b) { bool __operator ! (const bool a) { return a == false; } -
+ diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 9dd3a893426..3b1475a1152 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -435,7 +435,7 @@ "\n" "\n" "void __operator += (inout float a, const float b) {\n" -" __asm float_add a, b;\n" +" __asm float_add a, a, b;\n" "}\n" "\n" "void __operator -= (inout float a, const float b) {\n" @@ -443,11 +443,11 @@ "}\n" "\n" "void __operator *= (inout float a, const float b) {\n" -" __asm float_multiply a, b;\n" +" __asm float_multiply a, a, b;\n" "}\n" "\n" "void __operator /= (inout float a, const float b) {\n" -" __asm float_divide a, b;\n" +" __asm float_divide a, a, b;\n" "}\n" "\n" "void __operator += (inout int x, const int y) {\n" @@ -1309,8 +1309,8 @@ "\n" "\n" "float __operator - (const float a) {\n" -" float c = a;\n" -" __asm float_negate c;\n" +" float c;\n" +" __asm float_negate c, a;\n" " return c;\n" "}\n" "\n" |