From: Alejandro Piñeiro <apinhe...@igalia.com> The implementation of these two operations is very similar, so it makes sense to group them together.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89580 --- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index 6d572be..92c88d4 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -1598,7 +1598,21 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr) /* Load the LOD info */ if (instr->op == nir_texop_tex || instr->op == nir_texop_txl) { - /* @TODO: not yet implemented */ + int mrf, writemask; + mrf = param_base + 1; + if (shadow_compare) { + writemask = WRITEMASK_Y; + /* mlen already incremented on shadow comparitor loading */ + } else { + writemask = WRITEMASK_X; + inst->mlen++; + } + + if (instr->op == nir_texop_tex) + lod = src_reg(0.0f); + + lod.swizzle = BRW_SWIZZLE_XXXX; + emit(MOV(dst_reg(MRF, mrf, lod.type, writemask), lod)); } else if (instr->op == nir_texop_txf) { /* @TODO: not yet implemented */ } else if (instr->op == nir_texop_txf_ms) { -- 2.1.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev