summaryrefslogtreecommitdiff
path: root/dist/Mesa/src/glsl/builtins/tools/generate_transposeGLSL.py
diff options
context:
space:
mode:
Diffstat (limited to 'dist/Mesa/src/glsl/builtins/tools/generate_transposeGLSL.py')
-rw-r--r--dist/Mesa/src/glsl/builtins/tools/generate_transposeGLSL.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/dist/Mesa/src/glsl/builtins/tools/generate_transposeGLSL.py b/dist/Mesa/src/glsl/builtins/tools/generate_transposeGLSL.py
deleted file mode 100644
index 8f669ce98..000000000
--- a/dist/Mesa/src/glsl/builtins/tools/generate_transposeGLSL.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-
-def gen(x, y):
- origtype = "mat" + str(x)
- trantype = "mat" + str(y)
- if x != y:
- origtype = origtype + "x" + str(y)
- trantype = trantype + "x" + str(x)
- print trantype + " transpose(" + origtype + " m)\n{"
- print " " + trantype + " t;"
-
- # The obvious implementation of transpose
- for i in range(x):
- for j in range(y):
- print " t[" + str(j) + "][" + str(i) + "] =",
- print "m[" + str(i) + "][" + str(j) + "];"
- print " return t;\n}"
-
-print "#version 120"
-gen(2,2)
-gen(2,3) # mat2x3 means 2 columns, 3 rows
-gen(2,4)
-gen(3,2)
-gen(3,3)
-gen(3,4)
-gen(4,2)
-gen(4,3)
-gen(4,4)