i965/fs_nir: Make the sampler register always unsigned
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 15 Oct 2014 17:41:04 +0000 (10:41 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:18:59 +0000 (07:18 -0800)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index 91c1ffcc34ac5e2f217cc10d18eea03785c22a33..6d1fbf6a354d7871e6dae03c2fe0aadbd862bf9c 100644 (file)
@@ -1540,7 +1540,7 @@ void
 fs_visitor::nir_emit_texture(nir_tex_instr *instr)
 {
    brw_wm_prog_key *key = (brw_wm_prog_key*) this->key;
-   int sampler = instr->sampler_index;
+   unsigned sampler = instr->sampler_index;
 
    /* FINISHME: We're failing to recompile our programs when the sampler is
     * updated.  This only matters for the texture rectangle scale parameters
@@ -1582,7 +1582,7 @@ fs_visitor::nir_emit_texture(nir_tex_instr *instr)
          lod = src;
          break;
       case nir_tex_src_ms_index:
-         sample_index = src;
+         sample_index = retype(src, BRW_REGISTER_TYPE_UD);
          break;
       case nir_tex_src_offset:
          offset = src;