cr_blitter.h revision d171c6e83ee2cdae7d630182ee101efbf0f8c0e8
/* $Id$ */
/** @file
* Blitter API
*/
/*
* Copyright (C) 2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___cr_blitter_h__
#define ___cr_blitter_h__
#include "cr_spu.h"
#include "cr_vreg.h"
#ifndef IN_RING0
#else
#endif
/* GLSL Cache */
typedef struct CR_GLSL_CACHE
{
float glVersion;
{
}
{
}
/* clients should set proper context before calling these funcs */
/* BLITTER */
typedef struct CR_BLITTER_BUFFER
{
typedef union CR_BLITTER_FLAGS
{
struct
{
};
struct CR_BLITTER;
typedef DECLCALLBACK(int) FNCRBLT_BLITTER(struct CR_BLITTER *pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags);
typedef FNCRBLT_BLITTER *PFNCRBLT_BLITTER;
typedef struct CR_BLITTER_SPUITEM
{
int id;
typedef struct CR_BLITTER_CONTEXT
{
typedef struct CR_BLITTER_WINDOW
{
typedef struct CR_BLITTER_IMG
{
void *pvData;
typedef struct CR_BLITTER
{
const CR_BLITTER_CONTEXT *pRestoreCtxInfo;
const CR_BLITTER_WINDOW *pRestoreMural;
const CR_GLSL_CACHE *pGlslCache;
} CR_BLITTER, *PCR_BLITTER;
{
}
VBOXBLITTERDECL(int) CrBltInit(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, bool fForceDrawBlt, const CR_GLSL_CACHE *pShaders, SPUDispatchTable *pDispatch);
VBOXBLITTERDECL(int) CrBltCleanup(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pRestoreCtxInfo, const CR_BLITTER_WINDOW *pRestoreMural);
{
}
{
return !!pBlitter->pRestoreCtxInfo;
}
{
}
{
}
{
}
{
return &pBlitter->CurrentMural;
}
VBOXBLITTERDECL(int) CrBltEnter(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pRestoreCtxInfo, const CR_BLITTER_WINDOW *pRestoreMural);
VBOXBLITTERDECL(void) CrBltBlitTexMural(PCR_BLITTER pBlitter, bool fBb, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags);
VBOXBLITTERDECL(void) CrBltBlitTexTex(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect, const VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags);
VBOXBLITTERDECL(int) CrBltImgGetTex(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, GLenum enmFormat, CR_BLITTER_IMG *pDst);
/* */
#endif /* #ifndef ___cr_blitter_h__ */