[Mesa-dev] [PATCH] i965: don't use NumLayers for 3D textures.

Eduardo Lima Mitev elima at igalia.com
Fri Jun 3 16:16:29 UTC 2016


Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>

On 06/03/2016 04:34 AM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> 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
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  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 7bee792..939f9a0 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;
> 



More information about the mesa-dev mailing list