/* $Id: state_bits_globalop.h $ */ /** @file * Global State bits operation */ /* * 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; * you can redistribute it and/or modify it under the terms of the GNU * 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. */ #include #include #ifndef CRSTATE_BITS_OP # error "CRSTATE_BITS_OP must be defined!" #endif #define _CRSTATE_BITS_OP_SIZEOF(_val) CRSTATE_BITS_OP(_val, RT_SIZEOFMEMB(CRStateBits, _val)) #ifndef CRSTATE_BITS_OP_VERSION # define CRSTATE_BITS_OP_VERSION SHCROGL_SSM_VERSION #endif do { int i; #ifdef _CRSTATE_BITS_OP_STENCIL_V_33 # error "_CRSTATE_BITS_OP_STENCIL_V_33 must no be defined!" #endif #if CRSTATE_BITS_OP_VERSION < SHCROGL_SSM_VERSION_WITH_FIXED_STENCIL # define _CRSTATE_BITS_OP_STENCIL_V_33 #endif #ifdef _CRSTATE_BITS_OP_STENCIL_V_33 # ifndef CRSTATE_BITS_OP_STENCIL_OP_V_33 # error "CRSTATE_BITS_OP_STENCIL_OP_V_33 undefined!" # endif # ifndef CRSTATE_BITS_OP_STENCIL_FUNC_V_33 # error "CRSTATE_BITS_OP_STENCIL_FUNC_V_33 undefined!" # endif #endif _CRSTATE_BITS_OP_SIZEOF(attrib.dirty); _CRSTATE_BITS_OP_SIZEOF(buffer.dirty); _CRSTATE_BITS_OP_SIZEOF(buffer.enable); _CRSTATE_BITS_OP_SIZEOF(buffer.alphaFunc); _CRSTATE_BITS_OP_SIZEOF(buffer.depthFunc); _CRSTATE_BITS_OP_SIZEOF(buffer.blendFunc); _CRSTATE_BITS_OP_SIZEOF(buffer.logicOp); _CRSTATE_BITS_OP_SIZEOF(buffer.indexLogicOp); _CRSTATE_BITS_OP_SIZEOF(buffer.drawBuffer); _CRSTATE_BITS_OP_SIZEOF(buffer.readBuffer); _CRSTATE_BITS_OP_SIZEOF(buffer.indexMask); _CRSTATE_BITS_OP_SIZEOF(buffer.colorWriteMask); _CRSTATE_BITS_OP_SIZEOF(buffer.clearColor); _CRSTATE_BITS_OP_SIZEOF(buffer.clearIndex); _CRSTATE_BITS_OP_SIZEOF(buffer.clearDepth); _CRSTATE_BITS_OP_SIZEOF(buffer.clearAccum); _CRSTATE_BITS_OP_SIZEOF(buffer.depthMask); #ifdef CR_EXT_blend_color _CRSTATE_BITS_OP_SIZEOF(buffer.blendColor); #endif #if defined(CR_EXT_blend_minmax) || defined(CR_EXT_blend_subtract) || defined(CR_EXT_blend_logic_op) _CRSTATE_BITS_OP_SIZEOF(buffer.blendEquation); #endif #if defined(CR_EXT_blend_func_separate) _CRSTATE_BITS_OP_SIZEOF(buffer.blendFuncSeparate); #endif #ifdef CR_ARB_vertex_buffer_object _CRSTATE_BITS_OP_SIZEOF(bufferobject.dirty); _CRSTATE_BITS_OP_SIZEOF(bufferobject.arrayBinding); _CRSTATE_BITS_OP_SIZEOF(bufferobject.elementsBinding); # ifdef CR_ARB_pixel_buffer_object _CRSTATE_BITS_OP_SIZEOF(bufferobject.packBinding); _CRSTATE_BITS_OP_SIZEOF(bufferobject.unpackBinding); # endif #endif _CRSTATE_BITS_OP_SIZEOF(client.dirty); _CRSTATE_BITS_OP_SIZEOF(client.pack); _CRSTATE_BITS_OP_SIZEOF(client.unpack); _CRSTATE_BITS_OP_SIZEOF(client.enableClientState); _CRSTATE_BITS_OP_SIZEOF(client.clientPointer); CRSTATE_BITS_OP(client.v, GLCLIENT_BIT_ALLOC*sizeof(CRbitvalue)); CRSTATE_BITS_OP(client.n, GLCLIENT_BIT_ALLOC*sizeof(CRbitvalue)); CRSTATE_BITS_OP(client.c, GLCLIENT_BIT_ALLOC*sizeof(CRbitvalue)); CRSTATE_BITS_OP(client.i, GLCLIENT_BIT_ALLOC*sizeof(CRbitvalue)); CRSTATE_BITS_OP(client.e, GLCLIENT_BIT_ALLOC*sizeof(CRbitvalue)); CRSTATE_BITS_OP(client.s, GLCLIENT_BIT_ALLOC*sizeof(CRbitvalue)); CRSTATE_BITS_OP(client.f, GLCLIENT_BIT_ALLOC*sizeof(CRbitvalue)); for (i=0; i= SHCROGL_SSM_VERSION_WITH_SPRITE_COORD_ORIGIN _CRSTATE_BITS_OP_SIZEOF(point.spriteCoordOrigin); #endif _CRSTATE_BITS_OP_SIZEOF(polygon.dirty); _CRSTATE_BITS_OP_SIZEOF(polygon.enable); _CRSTATE_BITS_OP_SIZEOF(polygon.offset); _CRSTATE_BITS_OP_SIZEOF(polygon.mode); _CRSTATE_BITS_OP_SIZEOF(polygon.stipple); _CRSTATE_BITS_OP_SIZEOF(program.dirty); _CRSTATE_BITS_OP_SIZEOF(program.vpEnable); _CRSTATE_BITS_OP_SIZEOF(program.fpEnable); _CRSTATE_BITS_OP_SIZEOF(program.vpBinding); _CRSTATE_BITS_OP_SIZEOF(program.fpBinding); for (i=0; i