diff options
author | Jason Ekstrand <[email protected]> | 2018-01-25 23:01:40 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-05-09 11:16:33 -0700 |
commit | 9e492bb92e95f02148165eb9e9e3f37f76a66417 (patch) | |
tree | b5cc610af57099d01253a274e4172f2e4516afe8 | |
parent | 9981709d8f3cadf04950fae3ac6f34afdfd2d3fb (diff) |
intel/blorp: Include nir_format_convert.h in blorp_blit.c
nir_mask_shift_or is now defined in nir_format_convert.h so we can
delete the copy in blorp_blit.c.
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r-- | src/intel/blorp/blorp_blit.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 5cfc1a90ac0..d54dd1ecc0d 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -22,6 +22,7 @@ */ #include "blorp_nir_builder.h" +#include "compiler/nir/nir_format_convert.h" #include "blorp_priv.h" @@ -282,25 +283,6 @@ blorp_blit_txf_ms_mcs(nir_builder *b, struct brw_blorp_blit_vars *v, return &tex->dest.ssa; } -static nir_ssa_def * -nir_mask_shift_or(struct nir_builder *b, nir_ssa_def *dst, nir_ssa_def *src, - uint32_t src_mask, int src_left_shift) -{ - nir_ssa_def *masked = nir_iand(b, src, nir_imm_int(b, src_mask)); - - nir_ssa_def *shifted; - if (src_left_shift > 0) { - shifted = nir_ishl(b, masked, nir_imm_int(b, src_left_shift)); - } else if (src_left_shift < 0) { - shifted = nir_ushr(b, masked, nir_imm_int(b, -src_left_shift)); - } else { - assert(src_left_shift == 0); - shifted = masked; - } - - return nir_ior(b, dst, shifted); -} - /** * Emit code to compensate for the difference between Y and W tiling. * |