[Mesa-dev] [PATCH 2/5] intel_fbo: set gl_renderbuffer Depth field

Pohjolainen, Topi topi.pohjolainen at intel.com
Mon May 20 23:30:06 PDT 2013


On Fri, May 17, 2013 at 07:11:36PM -0700, Jordan Justen wrote:
> Set the renderbuffer's Depth field to match the texture's
> Depth when rendering to a texture.
> 
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  src/mesa/drivers/dri/intel/intel_fbo.c |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> index a8a7ab3..243c00a 100644
> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> @@ -482,14 +482,17 @@ intel_framebuffer_renderbuffer(struct gl_context * ctx,
>  static bool
>  intel_renderbuffer_update_wrapper(struct intel_context *intel,
>                                    struct intel_renderbuffer *irb,
> -				  struct gl_texture_image *image,
> -                                  uint32_t layer)
> +                                  struct gl_texture_image *image,
> +                                  uint32_t layer,
> +                                  bool layered)

This belongs to the next patch in the series, right?

>  {
>     struct gl_renderbuffer *rb = &irb->Base.Base;
>     struct intel_texture_image *intel_image = intel_texture_image(image);
>     struct intel_mipmap_tree *mt = intel_image->mt;
>     int level = image->Level;
>  
> +   rb->Depth = image->Depth;
> +
>     rb->AllocStorage = intel_nop_alloc_storage;
>  
>     intel_miptree_check_level_layer(mt, level, layer);
> @@ -598,7 +601,7 @@ intel_render_texture(struct gl_context * ctx,
>  
>     intel_miptree_check_level_layer(mt, att->TextureLevel, layer);
>  
> -   if (!intel_renderbuffer_update_wrapper(intel, irb, image, layer)) {
> +   if (!intel_renderbuffer_update_wrapper(intel, irb, image, layer, att->Layered)) {
>         _swrast_render_texture(ctx, fb, att);
>         return;
>     }
> -- 
> 1.7.10.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list