On Wed, May 16, 2012 at 01:51:14AM +0200, Roland Scheidegger wrote: > Wouldn't it be easier (and more efficient) if you could just reuse the > sampler code which does mipmap minification, i.e. get the texture sizes > from bld.int_size and do a lp_build_minify (followed by extract shuffles)?
We can try that, but I'm not really convinced it will be any better (or more readable). You'd have to slot the 1-3 dimensions in one vector, call minify, unslot the values and broadcast them in individual soa vectors. > Also, is it on purpose that the non-explicit lod path doesn't handle all > cases (using lp_build_minify would handle both cases equally if you pass > zero as the level)? If you mean the commented lines (there is one in the non-explicit lod path too), these are the cases where the enumeration value doesn't actually exist. Well, TGSI_TEXTURE_BUFFER exists now. And damn, it's supposed to be a PIPE_TEXTURE_* there and not a TGSI_TEXTURE_*, fuck. And why the hell do we have multiple enumerations describing the same thing with different values, some more or less complete ? I understand not wanting to use the GL_TEXTURE_* numbers, since they make dispatch tables hard, but TGSI_ and PIPE_ ? Other than that, the lod is not optional at the glsl level, whether it's there is sampler-type dependant, but there's no "simplified" version. > Otherwise looks like a good idea to me (well ok I'm not too sure why > this opcode is terribly useful in the first place but it exists...). Probably more useful with data-as-texture when uniform buffers aren't big enough. OG. _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
