glsl: add support for ARB_texture_multisample

V2: - emit `sample` parameter properly for multisample texelFetch()
    - fix spurious whitespace change
    - introduce a new opcode ir_txf_ms rather than overloading the
      existing ir_txf further. This makes doing the right thing in
      the driver somewhat simpler.

V3: - fix weird whitespace

V4: - don't forget to include the new opcode in tex_opcode_strs[]
      (thanks Kenneth for spotting this)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
[V2] Reviewed-by: Eric Anholt <eric@anholt.net>
[V2] Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Chris Forbes
2012-12-21 21:33:37 +13:00
parent 16af0aca09
commit ffb53b4f03
20 changed files with 153 additions and 26 deletions

View File

@@ -260,7 +260,7 @@ void ir_print_visitor::visit(ir_texture *ir)
printf(" ");
}
if (ir->op != ir_txf && ir->op != ir_txs) {
if (ir->op != ir_txf && ir->op != ir_txf_ms && ir->op != ir_txs) {
if (ir->projector)
ir->projector->accept(this);
else
@@ -287,6 +287,9 @@ void ir_print_visitor::visit(ir_texture *ir)
case ir_txs:
ir->lod_info.lod->accept(this);
break;
case ir_txf_ms:
ir->lod_info.sample_index->accept(this);
break;
case ir_txd:
printf("(");
ir->lod_info.grad.dPdx->accept(this);