From ff2e569153d48bda347be729fc441852ab293138 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 3 Jun 2016 11:36:38 +1000 Subject: [PATCH] i965: don't use NumLayers for 3D textures. For 3D textures we shouldn't be using NumLayers, we need to get it from the depth. This fixes: GL45-CTS.geometry_shader.layered_framebuffer.clear_call_support Reviewed-by: Eduardo Lima Mitev Cc: "12.0" Signed-off-by: Dave Airlie --- src/mesa/drivers/dri/i965/intel_fbo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 7bee792c04d..939f9a08c58 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -538,7 +538,7 @@ intel_renderbuffer_update_wrapper(struct brw_context *brw, if (!layered) { irb->layer_count = 1; - } else if (image->TexObject->NumLayers > 0) { + } else if (mt->target != GL_TEXTURE_3D && image->TexObject->NumLayers > 0) { irb->layer_count = image->TexObject->NumLayers; } else { irb->layer_count = mt->level[level].depth / layer_multiplier; -- 2.30.2