diff options
author | Paul Berry <[email protected]> | 2013-11-19 15:55:51 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-11-21 18:16:25 -0800 |
commit | 95140740ad1c6cd8a34002c307556f5c49a34589 (patch) | |
tree | 5a81dc207bad0e94c2b30ac06d20cc4e085ec599 /src/mesa/drivers/dri/i965/gen7_misc_state.c | |
parent | 085ad4821e450349ec1ba8c82d4bd0e7dcfef0af (diff) |
mesa: Track number of layers in layered framebuffers.
In order to properly clear layered framebuffers, we need to know how
many layers they have. The easiest way to do this is to record it in
the gl_framebuffer struct when we check framebuffer completeness.
This patch replaces the gl_framebuffer::Layered boolean with a
gl_framebuffer::NumLayers integer, which is 0 if the framebuffer is
not layered, and equal to the number of layers otherwise.
v2: Remove gl_framebuffer::Layered and make gl_framebuffer::NumLayers
always have a defined value. Fix factor of 6 error in the number of
layers in a cube map array.
Cc: "10.0" <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_misc_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_misc_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c index 3f3833e98e6..42519494d3c 100644 --- a/src/mesa/drivers/dri/i965/gen7_misc_state.c +++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c @@ -81,7 +81,7 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw, break; } - if (fb->Layered || !irb) { + if (fb->NumLayers > 0 || !irb) { min_array_element = 0; } else if (irb->mt->num_samples > 1) { /* Convert physical layer to logical layer. */ |