summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/builtins')
-rw-r--r--src/glsl/builtins/profiles/130.frag10
-rw-r--r--src/glsl/builtins/profiles/130.vert10
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.py10
-rwxr-xr-xsrc/glsl/builtins/tools/texture_builtins.py210
4 files changed, 153 insertions, 87 deletions
diff --git a/src/glsl/builtins/profiles/130.frag b/src/glsl/builtins/profiles/130.frag
index 329116f2a28..43653a906f8 100644
--- a/src/glsl/builtins/profiles/130.frag
+++ b/src/glsl/builtins/profiles/130.frag
@@ -635,7 +635,6 @@ uvec4 textureLod(usampler2DArray sampler, vec3 P, float lod);
float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);
-#if 0
/* textureOffset - no bias */
vec4 textureOffset( sampler1D sampler, float P, int offset);
ivec4 textureOffset(isampler1D sampler, float P, int offset);
@@ -687,7 +686,6 @@ ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias);
uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias);
-#endif
/* texelFetch */
vec4 texelFetch( sampler1D sampler, int P, int lod);
@@ -710,7 +708,6 @@ uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod);
ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
-#if 0
/* texelFetchOffset */
vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
@@ -801,7 +798,6 @@ ivec4 textureLodOffset(isampler2DArray samp, vec3 P, float lod, ivec2 offset);
uvec4 textureLodOffset(usampler2DArray samp, vec3 P, float lod, ivec2 offset);
float textureLodOffset(sampler1DArrayShadow s, vec3 P, float lod, int offset);
-#endif
/* textureProjLod */
vec4 textureProjLod( sampler1D sampler, vec2 P, float lod);
@@ -825,7 +821,6 @@ uvec4 textureProjLod(usampler3D sampler, vec4 P, float lod);
float textureProjLod(sampler1DShadow sampler, vec4 P, float lod);
float textureProjLod(sampler2DShadow sampler, vec4 P, float lod);
-#if 0
/* textureProjLodOffset */
vec4 textureProjLodOffset( sampler1D sampler, vec2 P, float lod, int offset);
ivec4 textureProjLodOffset(isampler1D sampler, vec2 P, float lod, int offset);
@@ -847,7 +842,6 @@ uvec4 textureProjLodOffset(usampler3D sampler, vec4 P, float lod, ivec3 offset);
float textureProjLodOffset(sampler1DShadow s, vec4 P, float lod, int offset);
float textureProjLodOffset(sampler2DShadow s, vec4 P, float lod, ivec2 offset);
-#endif
/* textureGrad */
vec4 textureGrad( sampler1D sampler, float P, float dPdx, float dPdy);
@@ -881,7 +875,6 @@ uvec4 textureGrad(usampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy);
float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureGradOffset */
vec4 textureGradOffset( sampler1D s, float P, float dx, float dy, int off);
ivec4 textureGradOffset(isampler1D s, float P, float dx, float dy, int offset);
@@ -912,7 +905,6 @@ uvec4 textureGradOffset(usampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
float textureGradOffset(sampler1DArrayShadow s, vec3 P, float dx, float dy, int o);
float textureGradOffset(sampler2DArrayShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
-#endif
/* textureProjGrad */
vec4 textureProjGrad( sampler1D sampler, vec2 P, float dPdx, float dPdy);
@@ -936,7 +928,6 @@ uvec4 textureProjGrad(usampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy);
float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureProjGradOffset */
vec4 textureProjGradOffset( sampler1D s, vec2 P, float dx, float dy, int off);
ivec4 textureProjGradOffset(isampler1D s, vec2 P, float dx, float dy, int off);
@@ -958,7 +949,6 @@ uvec4 textureProjGradOffset(usampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
float textureProjGradOffset(sampler1DShadow s, vec4 P, float dx, float dy, int o);
float textureProjGradOffset(sampler2DShadow s, vec4 P, vec2 dx, vec2 dy, vec2 o);
-#endif
/*
* The following texture functions are deprecated:
diff --git a/src/glsl/builtins/profiles/130.vert b/src/glsl/builtins/profiles/130.vert
index 1c212ebb3c5..742dec6e6d5 100644
--- a/src/glsl/builtins/profiles/130.vert
+++ b/src/glsl/builtins/profiles/130.vert
@@ -637,7 +637,6 @@ uvec4 textureLod(usampler2DArray sampler, vec3 P, float lod);
float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);
-#if 0
/* textureOffset - no bias */
vec4 textureOffset( sampler1D sampler, float P, int offset);
ivec4 textureOffset(isampler1D sampler, float P, int offset);
@@ -689,7 +688,6 @@ ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias);
uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias);
-#endif
/* texelFetch */
vec4 texelFetch( sampler1D sampler, int P, int lod);
@@ -712,7 +710,6 @@ uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod);
ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
-#if 0
/* texelFetchOffset */
vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
@@ -803,7 +800,6 @@ ivec4 textureLodOffset(isampler2DArray samp, vec3 P, float lod, ivec2 offset);
uvec4 textureLodOffset(usampler2DArray samp, vec3 P, float lod, ivec2 offset);
float textureLodOffset(sampler1DArrayShadow s, vec3 P, float lod, int offset);
-#endif
/* textureProjLod */
vec4 textureProjLod( sampler1D sampler, vec2 P, float lod);
@@ -827,7 +823,6 @@ uvec4 textureProjLod(usampler3D sampler, vec4 P, float lod);
float textureProjLod(sampler1DShadow sampler, vec4 P, float lod);
float textureProjLod(sampler2DShadow sampler, vec4 P, float lod);
-#if 0
/* textureProjLodOffset */
vec4 textureProjLodOffset( sampler1D sampler, vec2 P, float lod, int offset);
ivec4 textureProjLodOffset(isampler1D sampler, vec2 P, float lod, int offset);
@@ -849,7 +844,6 @@ uvec4 textureProjLodOffset(usampler3D sampler, vec4 P, float lod, ivec3 offset);
float textureProjLodOffset(sampler1DShadow s, vec4 P, float lod, int offset);
float textureProjLodOffset(sampler2DShadow s, vec4 P, float lod, ivec2 offset);
-#endif
/* textureGrad */
vec4 textureGrad( sampler1D sampler, float P, float dPdx, float dPdy);
@@ -883,7 +877,6 @@ uvec4 textureGrad(usampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy);
float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureGradOffset */
vec4 textureGradOffset( sampler1D s, float P, float dx, float dy, int off);
ivec4 textureGradOffset(isampler1D s, float P, float dx, float dy, int offset);
@@ -914,7 +907,6 @@ uvec4 textureGradOffset(usampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
float textureGradOffset(sampler1DArrayShadow s, vec3 P, float dx, float dy, int o);
float textureGradOffset(sampler2DArrayShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
-#endif
/* textureProjGrad */
vec4 textureProjGrad( sampler1D sampler, vec2 P, float dPdx, float dPdy);
@@ -938,7 +930,6 @@ uvec4 textureProjGrad(usampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy);
float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureProjGradOffset */
vec4 textureProjGradOffset( sampler1D s, vec2 P, float dx, float dy, int off);
ivec4 textureProjGradOffset(isampler1D s, vec2 P, float dx, float dy, int off);
@@ -960,7 +951,6 @@ uvec4 textureProjGradOffset(usampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
float textureProjGradOffset(sampler1DShadow s, vec4 P, float dx, float dy, int o);
float textureProjGradOffset(sampler2DShadow s, vec4 P, vec2 dx, vec2 dy, vec2 o);
-#endif
/*
* The following texture functions are deprecated:
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 3a938a022da..edd3c70e00b 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -152,6 +152,8 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
{
struct gl_context fakeCtx;
fakeCtx.API = API_OPENGL;
+ fakeCtx.Const.GLSLVersion = 130;
+ fakeCtx.Extensions.ARB_ES2_compatibility = true;
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
struct _mesa_glsl_parse_state *st =
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
@@ -178,7 +180,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
if (st->error) {
printf("error reading builtin: %.35s ...\\n", functions[i]);
printf("Info log:\\n%s\\n", st->info_log);
- talloc_free(sh);
+ ralloc_free(sh);
return NULL;
}
}
@@ -203,7 +205,7 @@ void *builtin_mem_ctx = NULL;
void
_mesa_glsl_release_functions(void)
{
- talloc_free(builtin_mem_ctx);
+ ralloc_free(builtin_mem_ctx);
builtin_mem_ctx = NULL;
memset(builtin_profiles, 0, sizeof(builtin_profiles));
}
@@ -219,7 +221,7 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
if (sh == NULL) {
sh = read_builtins(GL_VERTEX_SHADER, prototypes, functions, count);
- talloc_steal(builtin_mem_ctx, sh);
+ ralloc_steal(builtin_mem_ctx, sh);
builtin_profiles[profile_index] = sh;
}
@@ -231,7 +233,7 @@ void
_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
{
if (builtin_mem_ctx == NULL) {
- builtin_mem_ctx = talloc_init("GLSL built-in functions");
+ builtin_mem_ctx = ralloc_context(NULL); // "GLSL built-in functions"
memset(&builtin_profiles, 0, sizeof(builtin_profiles));
}
diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py
index 8bf708b5aac..8017e943b1b 100755
--- a/src/glsl/builtins/tools/texture_builtins.py
+++ b/src/glsl/builtins/tools/texture_builtins.py
@@ -3,6 +3,10 @@
import sys
import StringIO
+# Bitfield constants for the 'variant' argument to generate_sigs
+Proj = 1
+Offset = 2
+
def vec_type(g, size):
if size == 1:
if g == "i":
@@ -12,16 +16,20 @@ def vec_type(g, size):
return "float"
return g + "vec" + str(size)
-# Get the base dimension - i.e. sampler3D gives 3
-# Array samplers also get +1 here since the layer is really an extra coordinate
-def get_coord_dim(sampler_type):
+# Get the sampler dimension - i.e. sampler3D gives 3
+def get_sampler_dim(sampler_type):
if sampler_type[0].isdigit():
- coord_dim = int(sampler_type[0])
+ sampler_dim = int(sampler_type[0])
elif sampler_type.startswith("Cube"):
- coord_dim = 3
+ sampler_dim = 3
else:
assert False ("coord_dim: invalid sampler_type: " + sampler_type)
+ return sampler_dim
+# Get the coordinate dimension for a given sampler type.
+# Array samplers also get +1 here since the layer is really an extra coordinate
+def get_coord_dim(sampler_type):
+ coord_dim = get_sampler_dim(sampler_type)
if sampler_type.find("Array") != -1:
coord_dim += 1
return coord_dim
@@ -35,18 +43,17 @@ def get_extra_dim(sampler_type, use_proj, unused_fields):
extra_dim += 1
return extra_dim
-def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0):
+def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
coord_dim = get_coord_dim(sampler_type)
- extra_dim = get_extra_dim(sampler_type, use_proj, unused_fields)
+ extra_dim = get_extra_dim(sampler_type, variant & Proj, unused_fields)
+ offset_dim = get_sampler_dim(sampler_type)
# Print parameters
print " (signature " + g + "vec4"
print " (parameters"
print " (declare (in) " + g + "sampler" + sampler_type + " sampler)"
print " (declare (in) " + vec_type("i" if tex_inst == "txf" else "", coord_dim + extra_dim) + " P)",
- if tex_inst == "txb":
- print "\n (declare (in) float bias)",
- elif tex_inst == "txl":
+ if tex_inst == "txl":
print "\n (declare (in) float lod)",
elif tex_inst == "txf":
print "\n (declare (in) int lod)",
@@ -55,6 +62,11 @@ def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0
print "\n (declare (in) " + grad_type + " dPdx)",
print "\n (declare (in) " + grad_type + " dPdy)",
+ if variant & Offset:
+ print "\n (declare (const_in) " + vec_type("i", offset_dim) + " offset)",
+ if tex_inst == "txb":
+ print "\n (declare (in) float bias)",
+
print ")\n ((return (" + tex_inst + " (var_ref sampler)",
# Coordinate
@@ -63,12 +75,14 @@ def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0
else:
print "(var_ref P)",
- # Offset
- print "(0 0 0)",
+ if variant & Offset:
+ print "(var_ref offset)",
+ else:
+ print "0",
if tex_inst != "txf":
# Projective divisor
- if use_proj:
+ if variant & Proj:
print "(swiz " + "xyzw"[coord_dim + extra_dim-1] + " (var_ref P))",
else:
print "1",
@@ -90,10 +104,10 @@ def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0
print "((var_ref dPdx) (var_ref dPdy))",
print "))))\n"
-def generate_fiu_sigs(tex_inst, sampler_type, use_proj = False, unused_fields = 0):
- generate_sigs("", tex_inst, sampler_type, use_proj, unused_fields)
- generate_sigs("i", tex_inst, sampler_type, use_proj, unused_fields)
- generate_sigs("u", tex_inst, sampler_type, use_proj, unused_fields)
+def generate_fiu_sigs(tex_inst, sampler_type, variant = 0, unused_fields = 0):
+ generate_sigs("", tex_inst, sampler_type, variant, unused_fields)
+ generate_sigs("i", tex_inst, sampler_type, variant, unused_fields)
+ generate_sigs("u", tex_inst, sampler_type, variant, unused_fields)
def start_function(name):
sys.stdout = StringIO.StringIO()
@@ -127,17 +141,17 @@ def generate_texture_functions(fs):
end_function(fs, "texture")
start_function("textureProj")
- generate_fiu_sigs("tex", "1D", True)
- generate_fiu_sigs("tex", "1D", True, 2)
- generate_fiu_sigs("tex", "2D", True)
- generate_fiu_sigs("tex", "2D", True, 1)
- generate_fiu_sigs("tex", "3D", True)
-
- generate_fiu_sigs("txb", "1D", True)
- generate_fiu_sigs("txb", "1D", True, 2)
- generate_fiu_sigs("txb", "2D", True)
- generate_fiu_sigs("txb", "2D", True, 1)
- generate_fiu_sigs("txb", "3D", True)
+ generate_fiu_sigs("tex", "1D", Proj)
+ generate_fiu_sigs("tex", "1D", Proj, 2)
+ generate_fiu_sigs("tex", "2D", Proj)
+ generate_fiu_sigs("tex", "2D", Proj, 1)
+ generate_fiu_sigs("tex", "3D", Proj)
+
+ generate_fiu_sigs("txb", "1D", Proj)
+ generate_fiu_sigs("txb", "1D", Proj, 2)
+ generate_fiu_sigs("txb", "2D", Proj)
+ generate_fiu_sigs("txb", "2D", Proj, 1)
+ generate_fiu_sigs("txb", "3D", Proj)
end_function(fs, "textureProj")
start_function("textureLod")
@@ -149,6 +163,28 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txl", "2DArray")
end_function(fs, "textureLod")
+ start_function("textureLodOffset")
+ generate_fiu_sigs("txl", "1D", Offset)
+ generate_fiu_sigs("txl", "2D", Offset)
+ generate_fiu_sigs("txl", "3D", Offset)
+ generate_fiu_sigs("txl", "1DArray", Offset)
+ generate_fiu_sigs("txl", "2DArray", Offset)
+ end_function(fs, "textureLodOffset")
+
+ start_function("textureOffset")
+ generate_fiu_sigs("tex", "1D", Offset)
+ generate_fiu_sigs("tex", "2D", Offset)
+ generate_fiu_sigs("tex", "3D", Offset)
+ generate_fiu_sigs("tex", "1DArray", Offset)
+ generate_fiu_sigs("tex", "2DArray", Offset)
+
+ generate_fiu_sigs("txb", "1D", Offset)
+ generate_fiu_sigs("txb", "2D", Offset)
+ generate_fiu_sigs("txb", "3D", Offset)
+ generate_fiu_sigs("txb", "1DArray", Offset)
+ generate_fiu_sigs("txb", "2DArray", Offset)
+ end_function(fs, "textureOffset")
+
start_function("texelFetch")
generate_fiu_sigs("txf", "1D")
generate_fiu_sigs("txf", "2D")
@@ -157,14 +193,44 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txf", "2DArray")
end_function(fs, "texelFetch")
+ start_function("texelFetchOffset")
+ generate_fiu_sigs("txf", "1D", Offset)
+ generate_fiu_sigs("txf", "2D", Offset)
+ generate_fiu_sigs("txf", "3D", Offset)
+ generate_fiu_sigs("txf", "1DArray", Offset)
+ generate_fiu_sigs("txf", "2DArray", Offset)
+ end_function(fs, "texelFetchOffset")
+
+ start_function("textureProjOffset")
+ generate_fiu_sigs("tex", "1D", Proj | Offset)
+ generate_fiu_sigs("tex", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("tex", "2D", Proj | Offset)
+ generate_fiu_sigs("tex", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("tex", "3D", Proj | Offset)
+
+ generate_fiu_sigs("txb", "1D", Proj | Offset)
+ generate_fiu_sigs("txb", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("txb", "2D", Proj | Offset)
+ generate_fiu_sigs("txb", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("txb", "3D", Proj | Offset)
+ end_function(fs, "textureProjOffset")
+
start_function("textureProjLod")
- generate_fiu_sigs("txl", "1D", True)
- generate_fiu_sigs("txl", "1D", True, 2)
- generate_fiu_sigs("txl", "2D", True)
- generate_fiu_sigs("txl", "2D", True, 1)
- generate_fiu_sigs("txl", "3D", True)
+ generate_fiu_sigs("txl", "1D", Proj)
+ generate_fiu_sigs("txl", "1D", Proj, 2)
+ generate_fiu_sigs("txl", "2D", Proj)
+ generate_fiu_sigs("txl", "2D", Proj, 1)
+ generate_fiu_sigs("txl", "3D", Proj)
end_function(fs, "textureProjLod")
+ start_function("textureProjLodOffset")
+ generate_fiu_sigs("txl", "1D", Proj | Offset)
+ generate_fiu_sigs("txl", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("txl", "2D", Proj | Offset)
+ generate_fiu_sigs("txl", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("txl", "3D", Proj | Offset)
+ end_function(fs, "textureProjLodOffset")
+
start_function("textureGrad")
generate_fiu_sigs("txd", "1D")
generate_fiu_sigs("txd", "2D")
@@ -174,22 +240,40 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txd", "2DArray")
end_function(fs, "textureGrad")
+ start_function("textureGradOffset")
+ generate_fiu_sigs("txd", "1D", Offset)
+ generate_fiu_sigs("txd", "2D", Offset)
+ generate_fiu_sigs("txd", "3D", Offset)
+ generate_fiu_sigs("txd", "Cube", Offset)
+ generate_fiu_sigs("txd", "1DArray", Offset)
+ generate_fiu_sigs("txd", "2DArray", Offset)
+ end_function(fs, "textureGradOffset")
+
start_function("textureProjGrad")
- generate_fiu_sigs("txd", "1D", True)
- generate_fiu_sigs("txd", "1D", True, 2)
- generate_fiu_sigs("txd", "2D", True)
- generate_fiu_sigs("txd", "2D", True, 1)
- generate_fiu_sigs("txd", "3D", True)
+ generate_fiu_sigs("txd", "1D", Proj)
+ generate_fiu_sigs("txd", "1D", Proj, 2)
+ generate_fiu_sigs("txd", "2D", Proj)
+ generate_fiu_sigs("txd", "2D", Proj, 1)
+ generate_fiu_sigs("txd", "3D", Proj)
end_function(fs, "textureProjGrad")
+ start_function("textureProjGradOffset")
+ generate_fiu_sigs("txd", "1D", Proj | Offset)
+ generate_fiu_sigs("txd", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("txd", "2D", Proj | Offset)
+ generate_fiu_sigs("txd", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("txd", "3D", Proj | Offset)
+ end_function(fs, "textureProjGradOffset")
+
+
# ARB_texture_rectangle extension
start_function("texture2DRect")
generate_sigs("", "tex", "2DRect")
end_function(fs, "texture2DRect")
start_function("texture2DRectProj")
- generate_sigs("", "tex", "2DRect", True)
- generate_sigs("", "tex", "2DRect", True, 1)
+ generate_sigs("", "tex", "2DRect", Proj)
+ generate_sigs("", "tex", "2DRect", Proj, 1)
end_function(fs, "texture2DRectProj")
start_function("shadow2DRect")
@@ -197,7 +281,7 @@ def generate_texture_functions(fs):
end_function(fs, "shadow2DRect")
start_function("shadow2DRectProj")
- generate_sigs("", "tex", "2DRectShadow", True)
+ generate_sigs("", "tex", "2DRectShadow", Proj)
end_function(fs, "shadow2DRectProj")
# EXT_texture_array extension
@@ -243,15 +327,15 @@ def generate_texture_functions(fs):
end_function(fs, "texture1DLod")
start_function("texture1DProj")
- generate_sigs("", "tex", "1D", True)
- generate_sigs("", "tex", "1D", True, 2)
- generate_sigs("", "txb", "1D", True)
- generate_sigs("", "txb", "1D", True, 2)
+ generate_sigs("", "tex", "1D", Proj)
+ generate_sigs("", "tex", "1D", Proj, 2)
+ generate_sigs("", "txb", "1D", Proj)
+ generate_sigs("", "txb", "1D", Proj, 2)
end_function(fs, "texture1DProj")
start_function("texture1DProjLod")
- generate_sigs("", "txl", "1D", True)
- generate_sigs("", "txl", "1D", True, 2)
+ generate_sigs("", "txl", "1D", Proj)
+ generate_sigs("", "txl", "1D", Proj, 2)
end_function(fs, "texture1DProjLod")
start_function("texture2D")
@@ -264,15 +348,15 @@ def generate_texture_functions(fs):
end_function(fs, "texture2DLod")
start_function("texture2DProj")
- generate_sigs("", "tex", "2D", True)
- generate_sigs("", "tex", "2D", True, 1)
- generate_sigs("", "txb", "2D", True)
- generate_sigs("", "txb", "2D", True, 1)
+ generate_sigs("", "tex", "2D", Proj)
+ generate_sigs("", "tex", "2D", Proj, 1)
+ generate_sigs("", "txb", "2D", Proj)
+ generate_sigs("", "txb", "2D", Proj, 1)
end_function(fs, "texture2DProj")
start_function("texture2DProjLod")
- generate_sigs("", "txl", "2D", True)
- generate_sigs("", "txl", "2D", True, 1)
+ generate_sigs("", "txl", "2D", Proj)
+ generate_sigs("", "txl", "2D", Proj, 1)
end_function(fs, "texture2DProjLod")
start_function("texture3D")
@@ -285,12 +369,12 @@ def generate_texture_functions(fs):
end_function(fs, "texture3DLod")
start_function("texture3DProj")
- generate_sigs("", "tex", "3D", True)
- generate_sigs("", "txb", "3D", True)
+ generate_sigs("", "tex", "3D", Proj)
+ generate_sigs("", "txb", "3D", Proj)
end_function(fs, "texture3DProj")
start_function("texture3DProjLod")
- generate_sigs("", "txl", "3D", True)
+ generate_sigs("", "txl", "3D", Proj)
end_function(fs, "texture3DProjLod")
start_function("textureCube")
@@ -312,12 +396,12 @@ def generate_texture_functions(fs):
end_function(fs, "shadow1DLod")
start_function("shadow1DProj")
- generate_sigs("", "tex", "1DShadow", True, 1)
- generate_sigs("", "txb", "1DShadow", True, 1)
+ generate_sigs("", "tex", "1DShadow", Proj, 1)
+ generate_sigs("", "txb", "1DShadow", Proj, 1)
end_function(fs, "shadow1DProj")
start_function("shadow1DProjLod")
- generate_sigs("", "txl", "1DShadow", True, 1)
+ generate_sigs("", "txl", "1DShadow", Proj, 1)
end_function(fs, "shadow1DProjLod")
start_function("shadow2D")
@@ -330,12 +414,12 @@ def generate_texture_functions(fs):
end_function(fs, "shadow2DLod")
start_function("shadow2DProj")
- generate_sigs("", "tex", "2DShadow", True)
- generate_sigs("", "txb", "2DShadow", True)
+ generate_sigs("", "tex", "2DShadow", Proj)
+ generate_sigs("", "txb", "2DShadow", Proj)
end_function(fs, "shadow2DProj")
start_function("shadow2DProjLod")
- generate_sigs("", "txl", "2DShadow", True)
+ generate_sigs("", "txl", "2DShadow", Proj)
end_function(fs, "shadow2DProjLod")
sys.stdout = sys.__stdout__
@@ -346,4 +430,4 @@ if __name__ == "__main__":
fs = {}
generate_texture_functions(fs);
for k, v in fs.iteritems():
- print v
+ print v