summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-06-04 12:36:08 +0300
committerTopi Pohjolainen <[email protected]>2017-07-20 11:32:21 +0300
commit0f795effe512b77a21b1dd4b98430325657e1e65 (patch)
tree1256a6659edf2c8add05e2d9c5e7ebdffbbf1df4 /src/mesa
parent066dc9335e7afd1060bbec0f108abfc994eed514 (diff)
i965/fbo: Add support for isl-based miptrees in rb wrapper
Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_fbo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 87dc32673ce..bcb8d8039de 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -539,6 +539,10 @@ intel_renderbuffer_update_wrapper(struct brw_context *brw,
irb->layer_count = 1;
} else if (mt->target != GL_TEXTURE_3D && image->TexObject->NumLayers > 0) {
irb->layer_count = image->TexObject->NumLayers;
+ } else if (mt->surf.size > 0) {
+ irb->layer_count = mt->surf.dim == ISL_SURF_DIM_3D ?
+ minify(mt->surf.logical_level0_px.depth, level) :
+ mt->surf.logical_level0_px.array_len;
} else {
irb->layer_count = mt->level[level].depth / layer_multiplier;
}