Maybe aligned OWord block read's performance is better than unaligned, but because there is no way to check the address is OWord aligned or not in the compiler, and will introduce the other overhead if check in the runtime, so use unaligned OWord block read is OK to me.
Will push it later. > -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Xiuli Pan > Sent: Thursday, August 18, 2016 12:57 > To: [email protected] > Cc: Pan, Xiuli <[email protected]> > Subject: [Beignet] [PATCH] Backend: Refine block_read buffer with > unaligned OWord block read > > From: Pan Xiuli <[email protected]> > > Block read buffer may have address that is unaligned to OWord, using > unaligned OWord block read to refine block read buffer. > > Signed-off-by: Pan Xiuli <[email protected]> > --- > backend/src/backend/gen_context.cpp | 6 +++--- > backend/src/backend/gen_encoder.cpp | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/backend/src/backend/gen_context.cpp > b/backend/src/backend/gen_context.cpp > index b429ec3..34d74cd 100644 > --- a/backend/src/backend/gen_context.cpp > +++ b/backend/src/backend/gen_context.cpp > @@ -3507,7 +3507,7 @@ namespace gbe > > // Update the header with the current address > p->curr.execWidth = 1; > - p->SHR(headeraddr, addr, GenRegister::immud(4)); > + p->MOV(headeraddr, addr); > > // Put zero in the general state base address > p->MOV(GenRegister::offset(header, 0, 5 * 4), GenRegister::immud(0)); > @@ -3540,7 +3540,7 @@ namespace gbe > { > // Update the address in header > p->curr.execWidth = 1; > - p->ADD(headeraddr, headeraddr, GenRegister::immud(8)); > + p->ADD(headeraddr, headeraddr, GenRegister::immud(128)); > } > p->pop(); > } > @@ -3561,7 +3561,7 @@ namespace gbe > { > // Update the address in header > p->curr.execWidth = 1; > - p->ADD(headeraddr, headeraddr, GenRegister::immud(8)); > + p->ADD(headeraddr, headeraddr, GenRegister::immud(128)); > } > p->pop(); > } > diff --git a/backend/src/backend/gen_encoder.cpp > b/backend/src/backend/gen_encoder.cpp > index f8c99b2..975e1c7 100644 > --- a/backend/src/backend/gen_encoder.cpp > +++ b/backend/src/backend/gen_encoder.cpp > @@ -1270,7 +1270,7 @@ namespace gbe > insn, > bti, > size, > - GEN7_OBLOCK_READ, > + GEN7_UNALIGNED_OBLOCK_READ, > msg_length, > response_length); > } > -- > 2.7.4 > > _______________________________________________ > Beignet mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/beignet
