diff options
author | Jose Maria Casanova Crespo <[email protected]> | 2018-07-09 02:00:06 +0200 |
---|---|---|
committer | Jose Maria Casanova Crespo <[email protected]> | 2018-07-10 00:14:49 +0200 |
commit | 030472c1f04d393514df94d35fb9c1de499ff8cf (patch) | |
tree | 830c9819be93c6b003ebda723f159741835c2986 /src/intel/compiler/brw_fs_nir.cpp | |
parent | 232ed8980217dd65ab0925df28156f565b94b2e5 (diff) |
i965: Support for 8-bit base types in helper functions
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs_nir.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 02ac92e62f1..83ed9575f80 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -303,10 +303,13 @@ brw_reg_type_from_bit_size(const unsigned bit_size, default: unreachable("Invalid bit size"); } + case BRW_REGISTER_TYPE_B: case BRW_REGISTER_TYPE_W: case BRW_REGISTER_TYPE_D: case BRW_REGISTER_TYPE_Q: switch(bit_size) { + case 8: + return BRW_REGISTER_TYPE_B; case 16: return BRW_REGISTER_TYPE_W; case 32: @@ -316,10 +319,13 @@ brw_reg_type_from_bit_size(const unsigned bit_size, default: unreachable("Invalid bit size"); } + case BRW_REGISTER_TYPE_UB: case BRW_REGISTER_TYPE_UW: case BRW_REGISTER_TYPE_UD: case BRW_REGISTER_TYPE_UQ: switch(bit_size) { + case 8: + return BRW_REGISTER_TYPE_UB; case 16: return BRW_REGISTER_TYPE_UW; case 32: @@ -1666,7 +1672,10 @@ fs_visitor::get_nir_dest(const nir_dest &dest) { if (dest.is_ssa) { const brw_reg_type reg_type = - brw_reg_type_from_bit_size(dest.ssa.bit_size, BRW_REGISTER_TYPE_F); + brw_reg_type_from_bit_size(dest.ssa.bit_size, + dest.ssa.bit_size == 8 ? + BRW_REGISTER_TYPE_D : + BRW_REGISTER_TYPE_F); nir_ssa_values[dest.ssa.index] = bld.vgrf(reg_type, dest.ssa.num_components); return nir_ssa_values[dest.ssa.index]; |