From: Chad Versace Date: Tue, 21 Jun 2011 21:06:13 +0000 (-0700) Subject: intel: Change signature of intel_create_wrapped_renderbuffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8869a2623775a4879ac310d7073f184b7d45eed1;p=mesa.git intel: Change signature of intel_create_wrapped_renderbuffer Redeclare as non-static because intel_tex_image_s8z24_create_renderbuffers will use it. Remove the 'wrapper' parameter, because there is no wrapper for intel_texture_image.depth_rb and stencil_rb. Signed-off-by: Chad Versace --- diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index f48703e155c..8dd3696507f 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -107,12 +107,6 @@ intel_get_pointer(struct gl_context * ctx, struct gl_renderbuffer *rb, } -static struct gl_renderbuffer* -intel_create_wrapped_renderbuffer(struct gl_context * ctx, - struct gl_renderbuffer *wrapper, - gl_format format); - - /** * Called via glRenderbufferStorageEXT() to set the format and allocate * storage for a user-created renderbuffer. @@ -214,9 +208,9 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer struct gl_renderbuffer *depth_rb; struct gl_renderbuffer *stencil_rb; - depth_rb = intel_create_wrapped_renderbuffer(ctx, rb, + depth_rb = intel_create_wrapped_renderbuffer(ctx, width, height, MESA_FORMAT_X8_Z24); - stencil_rb = intel_create_wrapped_renderbuffer(ctx, rb, + stencil_rb = intel_create_wrapped_renderbuffer(ctx, width, height, MESA_FORMAT_S8); ok = depth_rb && stencil_rb; ok = ok && intel_alloc_renderbuffer_storage(ctx, depth_rb, @@ -236,6 +230,8 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer return false; } + depth_rb->Wrapped = rb; + stencil_rb->Wrapped = rb; _mesa_reference_renderbuffer(&irb->wrapped_depth, depth_rb); _mesa_reference_renderbuffer(&irb->wrapped_stencil, stencil_rb); @@ -409,9 +405,9 @@ intel_create_renderbuffer(gl_format format) } -static struct gl_renderbuffer * +struct gl_renderbuffer* intel_create_wrapped_renderbuffer(struct gl_context * ctx, - struct gl_renderbuffer *wrapper, + int width, int height, gl_format format) { /* @@ -433,18 +429,8 @@ intel_create_wrapped_renderbuffer(struct gl_context * ctx, rb->Format = format; rb->InternalFormat = rb->_BaseFormat; rb->DataType = intel_mesa_format_to_rb_datatype(format); - rb->Width = wrapper->Width; - rb->Height = wrapper->Height; - - rb->AllocStorage = intel_nop_alloc_storage; - rb->Delete = intel_delete_renderbuffer; - rb->GetPointer = intel_get_pointer; - - /* - * A refcount here would cause a cyclic reference. The wrapper references - * the unwrapper. - */ - rb->Wrapped = wrapper; + rb->Width = width; + rb->Height = height; return rb; } diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h index da0b24064df..08cf577a91c 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.h +++ b/src/mesa/drivers/dri/intel/intel_fbo.h @@ -169,6 +169,10 @@ intel_renderbuffer_set_hiz_region(struct intel_context *intel, extern struct intel_renderbuffer * intel_create_renderbuffer(gl_format format); +struct gl_renderbuffer* +intel_create_wrapped_renderbuffer(struct gl_context * ctx, + int width, int height, + gl_format format); extern void intel_fbo_init(struct intel_context *intel);