diff options
author | Eric Anholt <[email protected]> | 2012-07-04 10:52:31 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2012-07-17 08:17:38 -0700 |
commit | 433ff3e16e8e090fd3a1bf427e61f3e5971a5740 (patch) | |
tree | 27d996bafc0a147edebda24987b37b810fe6cab5 /src/mesa/drivers/dri/intel/intel_fbo.c | |
parent | bf484024b944a452e9022a1098313663e0028b29 (diff) |
intel: Add a function for creating a private window system buffer.
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_fbo.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index b86df6ccba2..f9fdc361de6 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -228,8 +228,6 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer struct intel_renderbuffer *irb = intel_renderbuffer(rb); rb->NumSamples = quantize_num_samples(intel, rb->NumSamples); - ASSERT(rb->Name != 0); - switch (internalFormat) { default: /* Use the same format-choice logic as for textures. @@ -428,6 +426,23 @@ intel_create_renderbuffer(gl_format format) } /** + * Private window-system buffers (as opposed to ones shared with the display + * server created with intel_create_renderbuffer()) are most similar in their + * handling to user-created renderbuffers, but they have a resize handler that + * may be called at intel_update_renderbuffers() time. + */ +struct intel_renderbuffer * +intel_create_private_renderbuffer(gl_format format) +{ + struct intel_renderbuffer *irb; + + irb = intel_create_renderbuffer(format); + irb->Base.Base.AllocStorage = intel_alloc_renderbuffer_storage; + + return irb; +} + +/** * Create a new renderbuffer object. * Typically called via glBindRenderbufferEXT(). */ |