summaryrefslogtreecommitdiff
path: root/builtins
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-08 16:03:46 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-06-09 11:14:58 -0700
commit5e65c1ccaefe8b47bb4df93251aa5a737621af75 (patch)
tree75291e0e744d834a676ed246815f1c0b74254411 /builtins
parent0d80f71867e561c541bf8832a182401297972543 (diff)
texture_builtins.py: Support the EXT_texture_array extension.
Diffstat (limited to 'builtins')
-rwxr-xr-xbuiltins/tools/texture_builtins.py31
1 files changed, 30 insertions, 1 deletions
diff --git a/builtins/tools/texture_builtins.py b/builtins/tools/texture_builtins.py
index d4648a2..be0bc6f 100755
--- a/builtins/tools/texture_builtins.py
+++ b/builtins/tools/texture_builtins.py
@@ -74,7 +74,9 @@ def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0
print "1",
# Shadow comparitor
- if sampler_type.endswith("Shadow"):
+ if sampler_type == "2DArrayShadow": # a special case:
+ print "(swiz w (var_ref P))", # ...array layer is z; shadow is w
+ elif sampler_type.endswith("Shadow"):
print "(swiz z (var_ref P))",
else:
print "()",
@@ -189,6 +191,33 @@ with open(path.join(builtins_dir, "ARB_texture_rectangle", "textures"), 'w') as
generate_sigs("", "tex", "2DRectShadow")
print "))"
+# EXT_texture_array extension
+with open(path.join(builtins_dir, "EXT_texture_array", "textures"), 'w') as sys.stdout:
+ print "((function texture1DArray"
+ generate_sigs("", "tex", "1DArray")
+ print ")\n (function texture1DArrayLod"
+ generate_sigs("", "txl", "1DArray")
+ print ")\n (function texture2DArray"
+ generate_sigs("", "tex", "2DArray")
+ print ")\n (function texture2DArrayLod"
+ generate_sigs("", "txl", "2DArray")
+ print ")\n (function shadow1DArray"
+ generate_sigs("", "tex", "1DArrayShadow")
+ print ")\n (function shadow1DArrayLod"
+ generate_sigs("", "txl", "1DArrayShadow")
+ print ")\n (function shadow2DArray"
+ generate_sigs("", "tex", "2DArrayShadow")
+ print "))"
+
+with open(path.join(builtins_dir, "EXT_texture_array_fs", "textures"), 'w') as sys.stdout:
+ print "((function texture1DArray"
+ generate_sigs("", "txb", "1DArray") # MOVE TO _fs
+ print ")\n (function texture2DArray"
+ generate_sigs("", "txb", "2DArray") # MOVE TO _fs
+ print ")\n (function shadow1DArray"
+ generate_sigs("", "txb", "1DArrayShadow")
+ print "))"
+
# Deprecated (110/120 style) functions with silly names:
with open(path.join(builtins_dir, "110", "textures"), 'w') as sys.stdout:
print "((function texture1D"