OSDN Git Service

intel: Add multisample scaled blitting in blorp engine
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 15 May 2013 00:20:02 +0000 (17:20 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 30 May 2013 17:50:30 +0000 (10:50 -0700)
commit0a70fdfb3ffe2b03c037c64076fe4c6d3e8a0fe5
treeb4776d6e41388a153d1d958771a5067943d87d61
parent6e28713a8dceed021bdeaa881e1b4977ac8103ab
intel: Add multisample scaled blitting in blorp engine

In traditional multisampled framebuffer rendering, color samples must be
explicitly resolved via BlitFramebuffer before doing the scaled blitting
of the framebuffer. So, scaled blitting of a multisample framebuffer
takes two separate calls to BlitFramebuffer.

This patch implements the functionality of doing multisampled scaled
resolve using just one BlitFramebuffer call. Important changes involved
in this patch are listed below:
    - Use float registers to scale and offset texture coordinates.
    - Change offset computation to consider float coordinates.
    - Round the scaled coordinates down to nearest integer.
    - Modify src texture coordinates clipping to account for scaling..
    - Linear filter is not yet implemented in blorp. So, don't use
      blorp engine to do single sampled scaled blitting.

V3: Fix nearest filtering issue in scaled blits. Makes failing piglit
fbo-blit-stetch test and framebuffer_blit_functionality_magnifying_blit.test
in gles3 CTS pass.

Observed no piglit, gles3 CTS regressions on sandybridge & ivybridge with
this patch.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_blorp.h
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/brw_reg.h
src/mesa/drivers/dri/intel/intel_mipmap_tree.c