[Mesa-dev] [PATCH 2/3] i965/fs: Implement texelFetch() on Ivybridge.
Ian Romanick
idr at freedesktop.org
Fri Sep 9 16:00:22 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/08/2011 03:49 PM, Kenneth Graunke wrote:
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org> ---
> src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 23
> ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3
> deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index
> d413bc4..31a2297 100644 ---
> a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++
> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -958,12 +958,29
> @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg
> coordinate, mlen += reg_width; break; case ir_txf: -
> assert(!"GLSL 1.30 features unsupported"); + /* Unfortunately,
> the parameters for LD are intermixed: u, lod, v, r. */ +
> fs_inst *inst = emit(BRW_OPCODE_MOV, + fs_reg(MRF, base_mrf +
> mlen, BRW_REGISTER_TYPE_D), + coordinate); +
> coordinate.reg_offset++; + mlen += reg_width; + +
> ir->lod_info.lod->accept(this); + emit(BRW_OPCODE_MOV,
> fs_reg(MRF, base_mrf + mlen, BRW_REGISTER_TYPE_D), this->result); +
> mlen += reg_width; + + for (int i = 1; i <
> ir->coordinate->type->vector_elements; i++) { + fs_inst *inst =
> emit(BRW_OPCODE_MOV, + fs_reg(MRF, base_mrf + mlen,
> BRW_REGISTER_TYPE_D), + coordinate); +
> coordinate.reg_offset++; + mlen += reg_width; + } break; }
>
> /* Set up the coordinate (except for TXD where it was done earlier)
> */ - if (ir->op != ir_txd && ir->op != ir_txs) { + if (ir->op
> != ir_txd && ir->op != ir_txs && ir->op != ir_txf) {
I think the comment is getting a bit stale. :)
> for (int i = 0; i < ir->coordinate->type->vector_elements; i++) {
> fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen),
> coordinate); @@ -981,7 +998,7 @@
> fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg
> coordinate, case ir_txb: inst = emit(FS_OPCODE_TXB, dst); break;
> case ir_txl: inst = emit(FS_OPCODE_TXL, dst); break; case ir_txd:
> inst = emit(FS_OPCODE_TXD, dst); break; - case ir_txf:
> assert(!"TXF unsupported."); break; + case ir_txf: inst =
> emit(FS_OPCODE_TXF, dst); break; case ir_txs: inst =
> emit(FS_OPCODE_TXS, dst); break; } inst->base_mrf = base_mrf;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk5qmoYACgkQX1gOwKyEAw8UswCfQ2JDBCY9PXX73XT9R7GQUn70
47UAn3iab2+FePc2DljDeOFZWNT8j13w
=zzj5
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list