summaryrefslogtreecommitdiff
path: root/src/VBox/GuestHost/OpenGL/include/cr_pack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/GuestHost/OpenGL/include/cr_pack.h')
-rw-r--r--src/VBox/GuestHost/OpenGL/include/cr_pack.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_pack.h b/src/VBox/GuestHost/OpenGL/include/cr_pack.h
index 82f7d5d7..3f7f930e 100644
--- a/src/VBox/GuestHost/OpenGL/include/cr_pack.h
+++ b/src/VBox/GuestHost/OpenGL/include/cr_pack.h
@@ -117,7 +117,11 @@ extern DECLEXPORT(void) crPackResetPointers( CRPackContext *pc );
extern DECLEXPORT(int) crPackMaxOpcodes( int buffer_size );
extern DECLEXPORT(int) crPackMaxData( int buffer_size );
-extern DECLEXPORT(void) crPackInitBuffer( CRPackBuffer *buffer, void *buf, int size, int mtu );
+extern DECLEXPORT(void) crPackInitBuffer( CRPackBuffer *buffer, void *buf, int size, int mtu
+#ifdef IN_RING0
+ , unsigned int num_opcodes
+#endif
+ );
extern DECLEXPORT(void) crPackFlushFunc( CRPackContext *pc, CRPackFlushFunc ff );
extern DECLEXPORT(void) crPackFlushArg( CRPackContext *pc, void *flush_arg );
extern DECLEXPORT(void) crPackSendHugeFunc( CRPackContext *pc, CRPackSendHugeFunc shf );
@@ -140,8 +144,10 @@ extern DECLEXPORT(int) crPackCanHoldBoundedBuffer( CR_PACKER_CONTEXT_ARGDECL con
#else
#undef CR_UNALIGNED_ACCESS_OKAY
#endif
+#ifndef IN_RING0
extern DECLEXPORT(void) crWriteUnalignedDouble( void *buffer, double d );
extern DECLEXPORT(void) crWriteSwappedDouble( void *buffer, double d );
+#endif
extern DECLEXPORT(void) *crPackAlloc( CR_PACKER_CONTEXT_ARGDECL unsigned int len );
extern DECLEXPORT(void) crHugePacket( CR_PACKER_CONTEXT_ARGDECL CROpcode op, void *ptr );
@@ -304,12 +310,22 @@ crPackCanHoldOpcode(const CRPackContext *pc, int num_opcode, int num_data)
#define WRITE_DOUBLE( offset, data ) \
WRITE_DATA( offset, GLdouble, data )
#else
-#define WRITE_DOUBLE( offset, data ) \
- crWriteUnalignedDouble( data_ptr + (offset), (data) )
+# ifndef IN_RING0
+# define WRITE_DOUBLE( offset, data ) \
+ crWriteUnalignedDouble( data_ptr + (offset), (data) )
+# else
+# define WRITE_DOUBLE( offset, data ) \
+ AssertReleaseFailed()
+# endif
#endif
+#ifndef IN_RING0
#define WRITE_SWAPPED_DOUBLE( offset, data ) \
crWriteSwappedDouble( data_ptr + (offset), (data) )
+#else
+#define WRITE_SWAPPED_DOUBLE( offset, data ) \
+ AssertReleaseFailed()
+#endif
#define WRITE_OPCODE( pc, opcode ) \
*(pc->buffer.opcode_current--) = (unsigned char) opcode