i965/fs: Use fs_reg for CS/VS atomics pixel mask immediate data
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 20 Feb 2015 20:12:25 +0000 (12:12 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Sat, 21 Feb 2015 19:40:53 +0000 (11:40 -0800)
The brw_imm_ud will yield a HW_REG which then will introduce a barrier
for certain optimization opportunities.

No piglit regressions seen with gen8 (simd8vs).

Suggested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index fa7d32cdab215e7f0621dd22706bc033efd9c6c6..b1b75821c73d2ab9f9c739f84d5f8eef10b9f62d 100644 (file)
@@ -3016,7 +3016,7 @@ fs_visitor::emit_untyped_atomic(unsigned atomic_op, unsigned surf_index,
        */
       assert(stage == MESA_SHADER_VERTEX || stage == MESA_SHADER_COMPUTE);
       emit(MOV(component(sources[0], 7),
-               brw_imm_ud(0xffff)))->force_writemask_all = true;
+               fs_reg(0xffff)))->force_writemask_all = true;
    }
    length++;
 
@@ -3079,7 +3079,7 @@ fs_visitor::emit_untyped_surface_read(unsigned surf_index, fs_reg dst,
        */
       assert(stage == MESA_SHADER_VERTEX || stage == MESA_SHADER_COMPUTE);
       emit(MOV(component(sources[0], 7),
-               brw_imm_ud(0xffff)))->force_writemask_all = true;
+               fs_reg(0xffff)))->force_writemask_all = true;
    }
 
    /* Set the surface read offset. */