[Mesa-dev] [PATCH V2 17/22] i965/gen9: Add XY_FAST_COPY_BLT support to intelEmitCopyBlit()

Matt Turner mattst88 at gmail.com
Thu May 21 13:51:49 PDT 2015


On Thu, May 21, 2015 at 12:26 PM, Ben Widawsky <ben at bwidawsk.net> wrote:
> A lot of opinion stuff is below, feel free to ignore them if you don't think
> there are improvements.
>
> On Fri, Apr 17, 2015 at 04:51:38PM -0700, Anuj Phogat wrote:
>> This patch enables using XY_FAST_COPY_BLT only for Yf/Ys tiled buffers.
>> Later It can be turned on for other tiling patterns (X,Y).
>>
>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>> ---
>>  src/mesa/drivers/dri/i965/intel_blit.c       | 292 +++++++++++++++++++++++----
>>  src/mesa/drivers/dri/i965/intel_blit.h       |   3 +
>>  src/mesa/drivers/dri/i965/intel_copy_image.c |   3 +
>>  src/mesa/drivers/dri/i965/intel_reg.h        |  33 +++
>>  4 files changed, 291 insertions(+), 40 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
>> index 9500bd7..36746c4 100644
>> --- a/src/mesa/drivers/dri/i965/intel_blit.c
>> +++ b/src/mesa/drivers/dri/i965/intel_blit.c
>> @@ -43,6 +43,23 @@
>>
>>  #define FILE_DEBUG_FLAG DEBUG_BLIT
>>
>> +#define SET_TILING_XY_FAST_COPY_BLT(tiling, tr_mode, type)           \
>> +({                                                                   \
>> +   switch (tiling) {                                                 \
>> +   case I915_TILING_X:                                               \
>> +      CMD |= type ## _TILED_X;                                       \
>> +      break;                                                         \
>> +   case I915_TILING_Y:                                               \
>
> assert(tr_mode != INTEL_MIPTREE_TRMODE_YF); ?
>
>> +      if (tr_mode == INTEL_MIPTREE_TRMODE_YS)                        \
>> +         CMD |= type ## _TILED_64K;                                  \
>> +      else                                                           \
>> +         CMD |= type ## _TILED_Y;                                    \
>> +      break;                                                         \
>> +   default:                                                          \
>> +      unreachable("not reached");                                    \
>> +   }                                                                 \
>> +})
>> +
>>  static void
>>  intel_miptree_set_alpha_to_one(struct brw_context *brw,
>>                                 struct intel_mipmap_tree *mt,
>> @@ -75,6 +92,12 @@ static uint32_t
>>  br13_for_cpp(int cpp)
>>  {
>>     switch (cpp) {
>> +   case 16:
>> +      return BR13_32323232;
>> +      break;
>> +   case 8:
>> +      return BR13_16161616;
>> +      break;
>>     case 4:
>>        return BR13_8888;
>>        break;

No need for break after return.


More information about the mesa-dev mailing list