ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
+ivec2 textureSize(sampler2DRect sampler);
+ivec2 textureSize(isampler2DRect sampler);
+ivec2 textureSize(usampler2DRect sampler);
+ivec2 textureSize(sampler2DRectShadow sampler);
+
/* texture - no bias */
vec4 texture( sampler1D sampler, float P);
ivec4 texture(isampler1D sampler, float P);
ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
+ivec2 textureSize(sampler2DRect sampler);
+ivec2 textureSize(isampler2DRect sampler);
+ivec2 textureSize(usampler2DRect sampler);
+ivec2 textureSize(sampler2DRectShadow sampler);
+
/* texture */
vec4 texture( sampler1D sampler, float P);
ivec4 texture(isampler1D sampler, float P);
print "\n (declare (in) " + vec_type("i" if tex_inst == "txf" else "", coord_dim + extra_dim) + " P)",
if tex_inst == "txl":
print "\n (declare (in) float lod)",
- elif tex_inst == "txf" or tex_inst == "txs":
+ elif tex_inst == "txf" or (tex_inst == "txs" and "Rect" not in sampler_type):
print "\n (declare (in) int lod)",
elif tex_inst == "txd":
grad_type = vec_type("", coord_dim)
# Bias/explicit LOD/gradient:
if tex_inst == "txb":
print "(var_ref bias)",
- elif tex_inst == "txl" or tex_inst == "txf" or tex_inst == "txs":
+ elif tex_inst == "txs":
+ if "Rect" not in sampler_type:
+ print "(var_ref lod)",
+ else:
+ print "(constant int (0))"
+ elif tex_inst == "txl" or tex_inst == "txf":
print "(var_ref lod)",
elif tex_inst == "txd":
print "((var_ref dPdx) (var_ref dPdy))",
generate_sigs("", "txs", "CubeShadow")
generate_sigs("", "txs", "1DArrayShadow")
generate_sigs("", "txs", "2DArrayShadow")
+ generate_fiu_sigs("txs", "2DRect")
+ generate_sigs("", "txs", "2DRectShadow")
end_function(fs, "textureSize")
start_function("texture")