[Mesa-dev] [PATCH 65/78] i965/nir/vec4: Setup LOD source register
Eduardo Lima Mitev
elima at igalia.com
Fri Jun 26 01:07:21 PDT 2015
From: Alejandro PiƱeiro <apinheiro at igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89580
---
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 15 ++++++++++++++-
1 file changed, 14 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 bc470cb..0f54858 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1421,6 +1421,7 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
const glsl_type *coord_type = NULL;
src_reg shadow_comparitor;
int shadow_compare = 0;
+ src_reg lod;
/* Load the texture operation sources */
for (unsigned i = 0; i < instr->num_srcs; i++) {
@@ -1459,7 +1460,19 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
break;
case nir_tex_src_lod:
- /* @TODO: not yet implemented */
+ switch (instr->op) {
+ case nir_texop_txs:
+ lod = retype(src, BRW_REGISTER_TYPE_UD);
+ break;
+
+ case nir_texop_txf:
+ lod = retype(src, BRW_REGISTER_TYPE_D);
+ break;
+
+ default:
+ lod = retype(src, BRW_REGISTER_TYPE_F);
+ break;
+ }
break;
case nir_tex_src_ms_index:
--
2.1.4
More information about the mesa-dev
mailing list