On Thu, Nov 19, 2015 at 9:53 AM, Matt Turner <matts...@gmail.com> wrote: > On Thu, Nov 19, 2015 at 8:00 AM, Jason Ekstrand <ja...@jlekstrand.net> wrote: >> On Wed, Nov 18, 2015 at 2:25 PM, Matt Turner <matts...@gmail.com> wrote: >>> --- >>> src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 +++ >>> src/mesa/drivers/dri/i965/brw_reg.h | 9 +++++++++ >>> 2 files changed, 12 insertions(+) >>> >>> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp >>> b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp >>> index e5a286a..78c10e9 100644 >>> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp >>> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp >>> @@ -116,6 +116,9 @@ brw_reg_from_fs_reg(fs_inst *inst, fs_reg *reg, >>> unsigned gen) >>> case BRW_REGISTER_TYPE_V: >>> brw_reg = brw_imm_v(reg->ud); >>> break; >>> + case BRW_REGISTER_TYPE_UV: >>> + brw_reg = brw_imm_uv(reg->ud); >>> + break; >>> default: >>> unreachable("not reached"); >>> } >>> diff --git a/src/mesa/drivers/dri/i965/brw_reg.h >>> b/src/mesa/drivers/dri/i965/brw_reg.h >>> index 759bd93..b77cdeb 100644 >>> --- a/src/mesa/drivers/dri/i965/brw_reg.h >>> +++ b/src/mesa/drivers/dri/i965/brw_reg.h >>> @@ -623,6 +623,15 @@ brw_imm_v(unsigned v) >>> return imm; >>> } >>> >>> +/** Construct vector of eight unsigned half-byte values */ >>> +static inline struct brw_reg >>> +brw_imm_uv(unsigned uv) >>> +{ >> >> Please add a GEN assertion either here or in the generator. This only >> becomes available on Haswell or Broadwell if I remember correctly. I >> do know it's not universally available. > > Good idea. (It's Sandybridge+)
On second thought, I can't (without adding a devinfo parameter to this function, which I'm not going to do) This is something the instruction validator can be tasked with verifying. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev