ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
+ vec4 texelFetch( samplerBuffer sampler, int P);
+ivec4 texelFetch(isamplerBuffer sampler, int P);
+uvec4 texelFetch(usamplerBuffer sampler, int P);
+
/* texelFetchOffset */
vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
+ vec4 texelFetch( samplerBuffer sampler, int P);
+ivec4 texelFetch(isamplerBuffer sampler, int P);
+uvec4 texelFetch(usamplerBuffer sampler, int P);
+
/* texelFetchOffset */
vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
sampler_dim = 3
elif sampler_type == "ExternalOES":
sampler_dim = 2
+ elif sampler_type == "Buffer":
+ sampler_dim = 1
else:
assert False ("coord_dim: invalid sampler_type: " + sampler_type)
return sampler_dim
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" and "Rect" not in sampler_type):
+ elif ((tex_inst == "txf" or tex_inst == "txs") and "Buffer" not in sampler_type 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 == "txs":
- if "Rect" not in sampler_type:
+ elif tex_inst == "txs" or tex_inst == "txf":
+ if "Rect" not in sampler_type and "Buffer" not in sampler_type:
print "(var_ref lod)",
else:
print "(constant int (0))"
- elif tex_inst == "txl" or tex_inst == "txf":
+ elif tex_inst == "txl":
print "(var_ref lod)",
elif tex_inst == "txd":
print "((var_ref dPdx) (var_ref dPdy))",
generate_fiu_sigs("txf", "3D")
generate_fiu_sigs("txf", "1DArray")
generate_fiu_sigs("txf", "2DArray")
+ generate_fiu_sigs("txf", "Buffer")
end_function(fs, "texelFetch")
start_function("texelFetchOffset")