[Mesa-dev] [PATCH 09/15] i965/fbo: Add support for isl-based miptrees in rb wrapper
Topi Pohjolainen
topi.pohjolainen at gmail.com
Tue Jun 13 19:11:00 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_fbo.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index e49f6df408..04ca480dfa 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -534,7 +534,8 @@ intel_renderbuffer_update_wrapper(struct brw_context *brw,
switch (mt->msaa_layout) {
case INTEL_MSAA_LAYOUT_UMS:
case INTEL_MSAA_LAYOUT_CMS:
- layer_multiplier = MAX2(mt->num_samples, 1);
+ layer_multiplier =
+ mt->surf.size > 0 ? mt->surf.samples : MAX2(mt->num_samples, 1);
break;
default:
@@ -547,6 +548,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 ?
+ mt->surf.logical_level0_px.depth :
+ mt->surf.logical_level0_px.array_len;
} else {
irb->layer_count = mt->level[level].depth / layer_multiplier;
}
--
2.11.0
More information about the mesa-dev
mailing list