diff options
author | Ilia Mirkin <[email protected]> | 2015-08-11 20:37:32 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-09-10 17:38:45 -0400 |
commit | 0b91bcea98c0fe201bba89abe1ca3aee4d04c56c (patch) | |
tree | 0a426e003b182c8954c6475afda07607fc756aba /src/mesa/drivers/dri/i965/brw_fs_nir.cpp | |
parent | 0c7fbcb84403ec318c77a51c98addd653529ae48 (diff) |
i965: add support for textureSamples function
Signed-off-by: Ilia Mirkin <[email protected]>
[v2: kayden-supplied code in fs_nir replacing need for logical opcode]
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_nir.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index a6c6a2fa8db..0902e1c396e 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -1842,6 +1842,16 @@ fs_visitor::nir_emit_texture(const fs_builder &bld, nir_tex_instr *instr) case nir_texop_txf_ms: op = ir_txf_ms; break; case nir_texop_txl: op = ir_txl; break; case nir_texop_txs: op = ir_txs; break; + case nir_texop_texture_samples: { + fs_reg dst = retype(get_nir_dest(instr->dest), BRW_REGISTER_TYPE_D); + fs_inst *inst = bld.emit(SHADER_OPCODE_SAMPLEINFO, dst, + bld.vgrf(BRW_REGISTER_TYPE_D, 1), + sampler_reg); + inst->mlen = 1; + inst->header_size = 1; + inst->base_mrf = -1; + return; + } default: unreachable("unknown texture opcode"); } |