VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_fence.c@ 69392

Last change on this file since 69392 was 69392, checked in by vboxsync, 7 years ago

GuestHost/OpenGL: scm updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.2 KB
Line 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#include "packer.h"
8
9void PACK_APIENTRY
10crPackDeleteFencesNV(GLsizei n, const GLuint * fences)
11{
12 unsigned char *data_ptr;
13 int packet_length = sizeof(GLenum) + sizeof(n) + n * sizeof(*fences);
14
15 if( !fences )
16 return;
17
18 data_ptr = (unsigned char *) crPackAlloc(packet_length);
19 WRITE_DATA(0, GLenum, CR_DELETEFENCESNV_EXTEND_OPCODE);
20 WRITE_DATA(4, GLsizei, n);
21 crMemcpy(data_ptr + 8, fences, n * sizeof(*fences));
22 crHugePacket(CR_EXTEND_OPCODE, data_ptr);
23 crPackFree(data_ptr);
24}
25
26void PACK_APIENTRY crPackDeleteFencesNVSWAP( GLsizei n, const GLuint *fences )
27{
28 unsigned char *data_ptr;
29 int i;
30 int packet_length = sizeof(GLenum) + sizeof(n) + n * sizeof(*fences);
31
32 if( !fences )
33 return;
34
35 data_ptr = (unsigned char *) crPackAlloc( packet_length );
36 WRITE_DATA(0, GLenum, CR_DELETEFENCESNV_EXTEND_OPCODE);
37 WRITE_DATA(4, GLsizei, n);
38 for (i = 0 ; i < n ; i++)
39 {
40 WRITE_DATA(i*sizeof(GLuint) + 8, GLuint, SWAP32(fences[i]));
41 }
42 crHugePacket(CR_EXTEND_OPCODE, data_ptr);
43 crPackFree(data_ptr);
44}
45
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette