On 27/11/06, Ivan Gyurdiev ivg231@gmail.com wrote:
H. Verbeet wrote:
There are a couple of instructions that have to sample from a texture, right now most of them duplicate that code, and hardcode the texture type.
Changelog:
- Create a separate function for sampling a texture
You should continue to use "add_param" or "get_register_name". There should be a single point in the code where register names are constructed, adding another one is a bad idea. This function is specifically tasked with naming registers, and taking into account things like relative addressing, so that when samplers support relative addressing in the future, changing the naming scheme would be trivial.
Except that that's not going to work. Some instructions, like texm3x3tex, only give you an index of the sampler to work with.