Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> --- src/mesa/drivers/dri/i965/brw_blorp.h | 4 +++- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h index ba7f42d..26daf06 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.h +++ b/src/mesa/drivers/dri/i965/brw_blorp.h @@ -187,8 +187,10 @@ struct brw_blorp_wm_push_constants float rect_grid_y1; brw_blorp_coord_transform_params x_transform; brw_blorp_coord_transform_params y_transform; + uint32_t src_stride; + uint32_t dst_stride; /* Pad out to an integral number of registers */ - uint32_t pad[6]; + uint32_t pad[4]; }; /* Every 32 bytes of push constant data constitutes one GEN register. */ diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index db6b429..c69fac4 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -684,6 +684,9 @@ private: struct brw_reg offset; } x_transform, y_transform; + struct brw_reg src_stride; + struct brw_reg dst_stride; + /* Data read from texture (4 vec16's per array element) */ struct brw_reg texture_data[LOG2_MAX_BLEND_SAMPLES + 1]; @@ -942,6 +945,8 @@ brw_blorp_blit_program::alloc_push_const_regs(int base_reg) ALLOC_REG(x_transform.offset, BRW_REGISTER_TYPE_F); ALLOC_REG(y_transform.multiplier, BRW_REGISTER_TYPE_F); ALLOC_REG(y_transform.offset, BRW_REGISTER_TYPE_F); + ALLOC_REG(src_stride, BRW_REGISTER_TYPE_UD); + ALLOC_REG(dst_stride, BRW_REGISTER_TYPE_UD); #undef CONST_LOC #undef ALLOC_REG } @@ -2180,6 +2185,9 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw, wm_push_consts.x_transform.setup(src_x0, src_x1, dst_x0, dst_x1, mirror_x); wm_push_consts.y_transform.setup(src_y0, src_y1, dst_y0, dst_y1, mirror_y); + wm_push_consts.src_stride = src_mt->region->pitch; + wm_push_consts.dst_stride = dst_mt->region->pitch; + if (dst.num_samples <= 1 && dst_mt->num_samples > 1) { /* We must expand the rectangle we send through the rendering pipeline, * to account for the fact that we are mapping the destination region as -- 1.8.3.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev