Typo in the subject line "an scalar". Samuel Iglesias Gonsálvez <sigles...@igalia.com> writes:
> Then the SIMD lowering pass will get rid of any compressed instructions with > scalar > source (whether force_writemask_all or not) and we avoid hitting the Gen7 > region > decompression bug. > > Signed-off-by: Samuel Iglesias Gonsálvez <sigles...@igalia.com> > Suggested-by: Francisco Jerez <curroje...@riseup.net> > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index 95714c16f15..a2ba0fde9fd 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > @@ -4516,6 +4516,11 @@ get_fpu_lowered_simd_width(const struct > gen_device_info *devinfo, > const unsigned reg_count = DIV_ROUND_UP(inst->size_written, > REG_SIZE); > max_width = MIN2(max_width, inst->exec_size / reg_count); > } > + > + if (type_sz(inst->src[i].type) == 8 && > + ((inst->size_read(i) != 0 && inst->size_read(i) <= REG_SIZE) || Not sure what you're trying to achieve with the line above. > + is_uniform(inst->src[i]))) > + max_width = MIN2(max_width, 4); AFAICT this is going to do the lowering incorrectly on HSW which doesn't have the same limitation. Let's restructure things slightly for readability: | for (unsigned i = 0; i < inst->sources; i++) { | /* IVB implements DF scalars as <0;2,1> regions. */ | const bool is_scalar_exception = is_uniform(inst->src[i]) && | (devinfo->is_haswell || type_sz(inst->src[i].type) != 8); | const bool is_packed_word_exception = | type_sz(inst->dst.type) == 4 && inst->dst.stride == 1 && | type_sz(inst->src[i].type) == 2 && inst->src[i].stride == 1; | | if (inst->size_written > REG_SIZE && | inst->size_read(i) != 0 && inst->size_read(i) <= REG_SIZE && | !is_scalar_exception && !is_packed_word_exception) { | // ... | } | } If you do it as above patch is: Reviewed-by: Francisco Jerez <curroje...@riseup.net> > } > } > > -- > 2.11.0 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev