pack_pixels.c revision 420f9d67d828890dcf3c94f96bb4b72885ff48a2
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/* Copyright (c) 2001, Stanford University
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * All rights reserved
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync *
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * See the file LICENSE.txt for information on redistributing this software.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "packer.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "cr_pixeldata.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "cr_error.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "cr_mem.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "cr_version.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncvoid PACK_APIENTRY crPackDrawPixels( GLsizei width, GLsizei height,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLenum format, GLenum type,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync const GLvoid *pixels,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync const CRPixelPackState *unpackstate )
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync{
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync unsigned char *data_ptr;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync int packet_length;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync if (pixels == NULL)
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync {
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync return;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync }
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#if 0
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync /* WHAT IS THIS FOR? Disabled by Brian on 3 Dec 2003 */
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync if (type == GL_BITMAP)
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync {
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crPackBitmap( width, height, 0, 0, 0, 0,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync (const GLubyte *) pixels, unpackstate );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync }
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#endif
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync packet_length =
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( width ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( height ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( format ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( type );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync packet_length += crImageSize( format, type, width, height );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync data_ptr = (unsigned char *) crPackAlloc( packet_length );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 0, GLsizei, width );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 4, GLsizei, height );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 8, GLenum, format );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 12, GLenum, type );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crPixelCopy2D( width, height,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync (void *) (data_ptr + 16), format, type, NULL, /* dst */
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync pixels, format, type, unpackstate ); /* src */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crHugePacket( CR_DRAWPIXELS_OPCODE, data_ptr );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync crPackFree( data_ptr );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync}
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncvoid PACK_APIENTRY crPackReadPixels( GLint x, GLint y, GLsizei width,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLsizei height, GLenum format,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLenum type, GLvoid *pixels,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync const CRPixelPackState *packstate,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync int *writeback)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync{
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GET_PACKER_CONTEXT(pc);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync unsigned char *data_ptr;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLint stride = 0;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLint bytes_per_row;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync int bytes_per_pixel;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync (void)writeback;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync bytes_per_pixel = crPixelSize(format, type);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync if (bytes_per_pixel <= 0) {
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync char string[80];
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sprintf(string, "crPackReadPixels(format 0x%x or type 0x%x)", format, type);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync __PackError(__LINE__, __FILE__, GL_INVALID_ENUM, string);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync return;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync }
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync /* default bytes_per_row so crserver can allocate memory */
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync bytes_per_row = width * bytes_per_pixel;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync stride = bytes_per_row;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync if (packstate->alignment != 1) {
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLint remainder = bytes_per_row % packstate->alignment;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync if (remainder)
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync stride = bytes_per_row + (packstate->alignment - remainder);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync }
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GET_BUFFERED_POINTER(pc, 48 + sizeof(CRNetworkPointer) );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 0, GLint, x );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 4, GLint, y );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 8, GLsizei, width );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 12, GLsizei, height );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 16, GLenum, format );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 20, GLenum, type );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 24, GLint, stride ); /* XXX not really used! */
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 28, GLint, packstate->alignment );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 32, GLint, packstate->skipRows );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 36, GLint, packstate->skipPixels );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 40, GLint, bytes_per_row );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 44, GLint, packstate->rowLength );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_NETWORK_POINTER( 48, (char *) pixels );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_OPCODE( pc, CR_READPIXELS_OPCODE );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync}
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/* Round N up to the next multiple of 8 */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#define CEIL8(N) (((N) + 7) & ~0x7)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncvoid PACK_APIENTRY crPackBitmap( GLsizei width, GLsizei height,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync const GLubyte *bitmap, const CRPixelPackState *unpack )
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync{
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync const int isnull = (bitmap == NULL);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync unsigned char *data_ptr;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync int data_length = 0;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLubyte *destBitmap = NULL;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync int packet_length =
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( width ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( height ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( xorig ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( yorig ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( xmove ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( ymove ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( GLuint );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync if ( bitmap )
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync {
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync data_length = CEIL8(width) * height / 8;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync packet_length += data_length;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync data_ptr = (unsigned char *) crPackAlloc( packet_length );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync destBitmap = data_ptr + 28;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crBitmapCopy(width, height, destBitmap, bitmap, unpack);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync /*
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crMemcpy(destBitmap, bitmap, data_length);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync */
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync }
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync else {
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync data_ptr = (unsigned char *) crPackAlloc( packet_length );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync }
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 0, GLsizei, width );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 4, GLsizei, height );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 8, GLfloat, xorig );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 12, GLfloat, yorig );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 16, GLfloat, xmove );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 20, GLfloat, ymove );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 24, GLuint, isnull );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crHugePacket( CR_BITMAP_OPCODE, data_ptr );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync crPackFree( data_ptr );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync}
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/*
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync ZPix - compressed DrawPixels
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync*/
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncvoid PACK_APIENTRY crPackZPixCR( GLsizei width, GLsizei height,
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync GLenum format, GLenum type,
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync GLenum ztype, GLint zparm, GLint length,
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync const GLvoid *pixels,
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync const CRPixelPackState *unpackstate )
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync{
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync unsigned char *data_ptr;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync int packet_length;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync (void)unpackstate;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync if (pixels == NULL)
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync {
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync return;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync }
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync packet_length =
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( int ) + /* packet size */
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( GLenum ) + /* extended opcode */
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( width ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( height ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( format ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( type ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( ztype ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( zparm ) +
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync sizeof( length );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync packet_length += length;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/* XXX JAG
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync crDebug("PackZPixCR: fb %d x %d, state %d, zlen = %d, plen = %d",
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync width, height, ztype, length, packet_length);
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync*/
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync data_ptr = (unsigned char *) crPackAlloc( packet_length );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 0, GLenum , CR_ZPIXCR_EXTEND_OPCODE );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 4, GLsizei, width );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 8, GLsizei, height );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 12, GLenum, format );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 16, GLenum, type );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 20, GLenum, ztype );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 24, GLint, zparm );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 28, GLint, length );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crMemcpy((void *) (data_ptr+32), pixels, length);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync crHugePacket( CR_EXTEND_OPCODE, data_ptr );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync crPackFree( data_ptr );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync}
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncvoid PACK_APIENTRY
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsynccrPackGetTexImage( GLenum target, GLint level, GLenum format, GLenum type,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GLvoid * pixels, const CRPixelPackState * packstate,
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync int * writeback )
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync{
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GET_PACKER_CONTEXT(pc);
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync unsigned char *data_ptr;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync (void) pc;
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync GET_BUFFERED_POINTER( pc, 40 );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 0, GLint, 40 );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 4, GLenum, CR_GETTEXIMAGE_EXTEND_OPCODE );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 8, GLenum, target );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 12, GLint, level );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 16, GLenum, format );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_DATA( 20, GLenum, type );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_NETWORK_POINTER( 24, (void *) pixels );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_NETWORK_POINTER( 32, (void *) writeback );
420f9d67d828890dcf3c94f96bb4b72885ff48a2vboxsync WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync}