diff options
author | Jordan Justen <[email protected]> | 2013-07-29 13:51:31 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2013-08-04 11:52:38 -0700 |
commit | d44be9ed2fc72a0c0047286762a9740c41e02ef3 (patch) | |
tree | 107f4e176ab8dbd996f3d99f460cfd983374dc71 /src/mesa | |
parent | 814a0405048f96f0427f29316a86bfdfb6c8f1ce (diff) |
i965: add intel_renderbuffer_att_set_needs_depth_resolve
This function is needed to support layered rendering. With
layered rendering, the attachment stores the state of whether
layered rendering is being used.
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_fbo.c | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_fbo.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 5d5d8b57cb4..ea376820045 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -854,6 +854,21 @@ intel_renderbuffer_resolve_hiz(struct brw_context *brw, return false; } +void +intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment *att) +{ + struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer); + if (irb->mt) { + if (att->Layered) { + intel_miptree_set_all_slices_need_depth_resolve(irb->mt, irb->mt_level); + } else { + intel_miptree_slice_set_needs_depth_resolve(irb->mt, + irb->mt_level, + irb->mt_layer); + } + } +} + bool intel_renderbuffer_resolve_depth(struct brw_context *brw, struct intel_renderbuffer *irb) diff --git a/src/mesa/drivers/dri/i965/intel_fbo.h b/src/mesa/drivers/dri/i965/intel_fbo.h index 2a8a462b18e..05e96aad7b3 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.h +++ b/src/mesa/drivers/dri/i965/intel_fbo.h @@ -164,6 +164,9 @@ intel_renderbuffer_set_needs_hiz_resolve(struct intel_renderbuffer *irb); void intel_renderbuffer_set_needs_depth_resolve(struct intel_renderbuffer *irb); +void +intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment *att); + /** * \brief Perform a HiZ resolve on the renderbuffer. |