mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-16 08:40:29 +01:00
r300: add support for EXT_framebuffer_blit
This commit is contained in:
parent
a88678d3ee
commit
ed14a4cb7b
3 changed files with 39 additions and 39 deletions
|
|
@ -80,6 +80,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#define need_GL_EXT_blend_equation_separate
|
||||
#define need_GL_EXT_blend_func_separate
|
||||
#define need_GL_EXT_blend_minmax
|
||||
#define need_GL_EXT_framebuffer_blit
|
||||
#define need_GL_EXT_framebuffer_object
|
||||
#define need_GL_EXT_fog_coord
|
||||
#define need_GL_EXT_gpu_program_parameters
|
||||
|
|
@ -143,6 +144,7 @@ const struct dri_extension card_extensions[] = {
|
|||
|
||||
|
||||
const struct dri_extension mm_extensions[] = {
|
||||
{ "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions },
|
||||
{ "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "utils.h"
|
||||
#include "vblank.h"
|
||||
#include "drirenderbuffer.h"
|
||||
#include "drivers/common/meta.h"
|
||||
#include "main/context.h"
|
||||
#include "main/framebuffer.h"
|
||||
#include "main/renderbuffer.h"
|
||||
|
|
@ -207,6 +208,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
|
|||
driContextPriv->driverPrivate = radeon;
|
||||
|
||||
meta_init_metaops(ctx, &radeon->meta);
|
||||
|
||||
_mesa_meta_init(ctx);
|
||||
|
||||
/* DRI fields */
|
||||
radeon->dri.context = driContextPriv;
|
||||
radeon->dri.screen = sPriv;
|
||||
|
|
@ -300,47 +304,48 @@ void radeonDestroyContext(__DRIcontextPrivate *driContextPriv )
|
|||
radeonContextPtr radeon = (radeonContextPtr) driContextPriv->driverPrivate;
|
||||
radeonContextPtr current = ctx ? RADEON_CONTEXT(ctx) : NULL;
|
||||
|
||||
assert(radeon);
|
||||
|
||||
_mesa_meta_free(radeon->glCtx);
|
||||
|
||||
if (radeon == current) {
|
||||
radeon_firevertices(radeon);
|
||||
_mesa_make_current(NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
assert(radeon);
|
||||
if (radeon) {
|
||||
if (!is_empty_list(&radeon->dma.reserved)) {
|
||||
rcommonFlushCmdBuf( radeon, __FUNCTION__ );
|
||||
}
|
||||
if (!is_empty_list(&radeon->dma.reserved)) {
|
||||
rcommonFlushCmdBuf( radeon, __FUNCTION__ );
|
||||
}
|
||||
|
||||
radeonFreeDmaRegions(radeon);
|
||||
radeonReleaseArrays(radeon->glCtx, ~0);
|
||||
meta_destroy_metaops(&radeon->meta);
|
||||
if (radeon->vtbl.free_context)
|
||||
radeon->vtbl.free_context(radeon->glCtx);
|
||||
_swsetup_DestroyContext( radeon->glCtx );
|
||||
_tnl_DestroyContext( radeon->glCtx );
|
||||
_vbo_DestroyContext( radeon->glCtx );
|
||||
_swrast_DestroyContext( radeon->glCtx );
|
||||
radeonFreeDmaRegions(radeon);
|
||||
radeonReleaseArrays(radeon->glCtx, ~0);
|
||||
meta_destroy_metaops(&radeon->meta);
|
||||
if (radeon->vtbl.free_context)
|
||||
radeon->vtbl.free_context(radeon->glCtx);
|
||||
_swsetup_DestroyContext( radeon->glCtx );
|
||||
_tnl_DestroyContext( radeon->glCtx );
|
||||
_vbo_DestroyContext( radeon->glCtx );
|
||||
_swrast_DestroyContext( radeon->glCtx );
|
||||
|
||||
/* free atom list */
|
||||
/* free the Mesa context */
|
||||
_mesa_destroy_context(radeon->glCtx);
|
||||
/* free atom list */
|
||||
/* free the Mesa context */
|
||||
_mesa_destroy_context(radeon->glCtx);
|
||||
|
||||
/* _mesa_destroy_context() might result in calls to functions that
|
||||
* depend on the DriverCtx, so don't set it to NULL before.
|
||||
*
|
||||
* radeon->glCtx->DriverCtx = NULL;
|
||||
*/
|
||||
/* free the option cache */
|
||||
driDestroyOptionCache(&radeon->optionCache);
|
||||
/* _mesa_destroy_context() might result in calls to functions that
|
||||
* depend on the DriverCtx, so don't set it to NULL before.
|
||||
*
|
||||
* radeon->glCtx->DriverCtx = NULL;
|
||||
*/
|
||||
/* free the option cache */
|
||||
driDestroyOptionCache(&radeon->optionCache);
|
||||
|
||||
rcommonDestroyCmdBuf(radeon);
|
||||
rcommonDestroyCmdBuf(radeon);
|
||||
|
||||
radeon_destroy_atom_list(radeon);
|
||||
radeon_destroy_atom_list(radeon);
|
||||
|
||||
if (radeon->state.scissor.pClipRects) {
|
||||
FREE(radeon->state.scissor.pClipRects);
|
||||
radeon->state.scissor.pClipRects = 0;
|
||||
}
|
||||
if (radeon->state.scissor.pClipRects) {
|
||||
FREE(radeon->state.scissor.pClipRects);
|
||||
radeon->state.scissor.pClipRects = 0;
|
||||
}
|
||||
#ifdef RADEON_BO_TRACK
|
||||
track = fopen("/tmp/tracklog", "w");
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "main/context.h"
|
||||
#include "main/texformat.h"
|
||||
#include "main/texrender.h"
|
||||
#include "drivers/common/meta.h"
|
||||
|
||||
#include "radeon_common.h"
|
||||
#include "radeon_mipmap_tree.h"
|
||||
|
|
@ -571,14 +572,6 @@ radeon_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
|
|||
{
|
||||
}
|
||||
|
||||
static void
|
||||
radeon_blit_framebuffer(GLcontext *ctx,
|
||||
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter)
|
||||
{
|
||||
}
|
||||
|
||||
void radeon_fbo_init(struct radeon_context *radeon)
|
||||
{
|
||||
radeon->glCtx->Driver.NewFramebuffer = radeon_new_framebuffer;
|
||||
|
|
@ -589,7 +582,7 @@ void radeon_fbo_init(struct radeon_context *radeon)
|
|||
radeon->glCtx->Driver.FinishRenderTexture = radeon_finish_render_texture;
|
||||
radeon->glCtx->Driver.ResizeBuffers = radeon_resize_buffers;
|
||||
radeon->glCtx->Driver.ValidateFramebuffer = radeon_validate_framebuffer;
|
||||
radeon->glCtx->Driver.BlitFramebuffer = radeon_blit_framebuffer;
|
||||
radeon->glCtx->Driver.BlitFramebuffer = _mesa_meta_blit_framebuffer;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue