VBoxVideo3D.h revision 56f7492d5b0ec33f49d27fc8607df4314f35cea9
/** @file
*
* VirtualBox 3D common tooling
*/
/*
* Copyright (C) 2011-2012 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.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#ifndef ___VBox_VBoxVideo3D_h
#define ___VBox_VBoxVideo3D_h
#ifndef VBoxTlsRefGetImpl
# ifdef VBoxTlsRefSetImpl
# error "VBoxTlsRefSetImpl is defined, unexpected!"
# endif
#else
# ifndef VBoxTlsRefSetImpl
# error "VBoxTlsRefSetImpl is NOT defined, unexpected!"
# endif
#endif
#ifndef VBoxTlsRefAssertImpl
# define VBoxTlsRefAssertImpl(_a) do {} while (0)
#endif
typedef DECLCALLBACK(void) FNVBOXTLSREFDTOR(void*);
typedef FNVBOXTLSREFDTOR *PFNVBOXTLSREFDTOR;
typedef enum {
VBOXTLSREFDATA_STATE_32BIT_HACK = 0x7fffffff
#define VBOXTLSREFDATA \
struct VBOXTLSREFDATA_DUMMY
{
};
#define VBOXTLSREFDATA_SIZE() (sizeof (struct VBOXTLSREFDATA_DUMMY))
} while (0)
)
} while (0)
#define VBoxTlsRefAddRef(_p) do { \
} while (0)
#define VBoxTlsRefRelease(_p) do { \
VBoxTlsRefAssertImpl(cRefs >= 0); \
if (!cRefs && (_p)->enmTlsRefState != VBOXTLSREFDATA_STATE_DESTROYING /* <- avoid recursion if VBoxTlsRefAddRef/Release is called from dtor */) { \
} \
} while (0)
#define VBoxTlsRefMarkDestroy(_p) do { \
} while (0)
} else { \
} \
} while (0)
if (oldCur) { \
} \
if ((_p)) { \
} \
} \
} while (0)
/* host 3D->Fe[/Qt] notification mechanism defines */
#define VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA 2
/* interface between the VGA device and 3D Server Backend
* VGA device and 3D backend work together in processing the VBVA-based ring buffer commands comming from guest.
* With this interaction VGA device acts like a client, while 3D backend acts as a server.
* VGA device can process some commands itself, while some of them are delegated to the 3D backend.
*
* */
/* client handle, passed to client callbacks (see below) */
typedef struct VBOXVDMAHOST *HVBOXCRCMDCLT;
typedef struct VBOXCMDVBVA_HDR *PVBOXCMDVBVA_HDR;
/* server queries client for the next command,
* the obtained command must be returned to the client right after it gets processed,
* the next PFNVBOXCRCMD_CLT_CMDGET call completes the previously submitted command,
* Must not be called from the EMT thread.*/
typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_CLT_CMDGET)(HVBOXCRCMDCLT hClt, PVBOXCMDVBVA_HDR *ppNextCmd, uint32_t *pcbNextCmd);
/* Client callbacks (i.e. those client exposes to the server) */
typedef struct VBOXCRCMD_CLTINFO
{
#endif /* #ifndef ___VBox_VBoxVideo3D_h */