i965: Gen7: add a new virtual opcode TXF_MS

This is very similar to the TXF opcode, but lowered to ld2dms rather
than ld; By the time we'd be making the decision about which to use in
brw_fs_emit.cpp, the necessary context (sampler dimensionality) is gone,
so split this out a bit further up.

TODO: Needs an assert for the message length -- the form we want has 5 args:
   si mcs u v r
The message accepts a 6th optional arg for the lod, but including it
explicitly would make the message too long for SIMD16 mode. It's a happy
coincidence then, that we always want lod 0.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Gen7: fix surface_state setup for msaa textures

These were already done correctly for render targets; never needed for
textures until now:

- Set the sample count & mode flags
- Set the GEN7_SURFACE_ARYSPC_LOD0 bit if it's set in the miptree.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Gen7: Implement texelFetch for *samplerMS* in fs

Use ld2dms with a hardcoded MCS value of 0; this works correctly for
both UMS and IMS surfaces on Gen7 -- the MCS value is ignored by ld2dms.

For UMS we could emit a slightly shorter message here by using ld2dss
(saves 1-2 regs) but that would get us back into having to emit
different shader code for each MSAA layout. This will need to be
revisited if we want to enable CMS for multisample textures.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
fix broken alignment unit for MSAA textures

This is a horrid hack, but if it actually fixes the problem I'll clean
up these functions to have this knowledge where it's needed.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
bind the correct (physical!) slice of a UMS/CMS multisample array texture for rendering

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965/vs: Gen7: fix texelFetch with multisample textures

This shares most of the Gen6 path, but lowers ir_txf to `ld2dms` rather
than plain `ld`. The additional MCS parameter to `ld2dms` is always zero
for UMS/IMS surfaces, so we just don't provide it.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>