summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
diff options
context:
space:
mode:
authorChad Versace <chad@chad-versace.us>2011-06-21 14:06:13 -0700
committerChad Versace <chad@chad-versace.us>2011-06-24 14:47:20 -0700
commit8869a2623775a4879ac310d7073f184b7d45eed1 (patch)
tree357709dd13a486514e2d9e0745bef7afe1d8c93e /src/mesa/drivers/dri/intel
parent951b75808eeac5fb97183ea8e653512bfa35fdb2 (diff)
downloadexternal_mesa3d-8869a2623775a4879ac310d7073f184b7d45eed1.zip
external_mesa3d-8869a2623775a4879ac310d7073f184b7d45eed1.tar.gz
external_mesa3d-8869a2623775a4879ac310d7073f184b7d45eed1.tar.bz2
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 <chad@chad-versace.us>
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c30
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h4
2 files changed, 12 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index f48703e..8dd3696 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 da0b240..08cf577 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);