Module: Mesa
Branch: master
Commit: 9e515cf38138bc0e7e884f893335ed486eac5741
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e515cf38138bc0e7e884f893335ed486eac5741

Author: Samuel Iglesias Gonsálvez <[email protected]>
Date:   Mon Oct  9 12:25:39 2017 +0200

i965/vec4: remove setting default LOD in the backend

It is already done in NIR.

Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>

---

 src/intel/compiler/brw_vec4_nir.cpp     |  9 ---------
 src/intel/compiler/brw_vec4_visitor.cpp | 12 ------------
 2 files changed, 21 deletions(-)

diff --git a/src/intel/compiler/brw_vec4_nir.cpp 
b/src/intel/compiler/brw_vec4_nir.cpp
index 9200ffa0ed..0a1caa9fad 100644
--- a/src/intel/compiler/brw_vec4_nir.cpp
+++ b/src/intel/compiler/brw_vec4_nir.cpp
@@ -2228,15 +2228,6 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
       }
    }
 
-   /* TXS and TXL require a LOD but not everything we implement using those
-    * two opcodes provides one.  Provide a default LOD of 0.
-    */
-   if ((instr->op == nir_texop_txs ||
-        instr->op == nir_texop_txl) &&
-       lod.file == BAD_FILE) {
-      lod = brw_imm_ud(0u);
-   }
-
    if (instr->op == nir_texop_txf_ms ||
        instr->op == nir_texop_samples_identical) {
       assert(coord_type != NULL);
diff --git a/src/intel/compiler/brw_vec4_visitor.cpp 
b/src/intel/compiler/brw_vec4_visitor.cpp
index a62c79ee7f..db27eae293 100644
--- a/src/intel/compiler/brw_vec4_visitor.cpp
+++ b/src/intel/compiler/brw_vec4_visitor.cpp
@@ -916,18 +916,6 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
                            src_reg surface_reg,
                            src_reg sampler_reg)
 {
-   /* The sampler can only meaningfully compute LOD for fragment shader
-    * messages. For all other stages, we change the opcode to TXL and hardcode
-    * the LOD to 0.
-    *
-    * textureQueryLevels() is implemented in terms of TXS so we need to pass a
-    * valid LOD argument.
-    */
-   if (op == ir_tex || op == ir_query_levels) {
-      assert(lod.file == BAD_FILE);
-      lod = brw_imm_f(0.0f);
-   }
-
    enum opcode opcode;
    switch (op) {
    case ir_tex: opcode = SHADER_OPCODE_TXL; break;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to