Changeset 21422 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Jul 9, 2009 10:03:37 AM (16 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL/packer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/packer/pack_arrays.c
r15532 r21422 26 26 * arrays - GL_ARB_vertex_buffer_object. Note that pointer will really 27 27 * be an offset into a server-side buffer. 28 * @todo Because of that we'd only transfer lowest 32bit as there're no 4gb+VBOs (yet?). 29 * Look at glgets regarding max vertices in arrays. 28 30 */ 29 31 GET_PACKER_CONTEXT(pc); 30 32 unsigned char *data_ptr; 31 int packet_length = 2 0 + sizeof(GLintptrARB);33 int packet_length = 24; 32 34 GET_BUFFERED_POINTER( pc, packet_length ); 33 35 WRITE_DATA( 0, GLint, packet_length ); … … 36 38 WRITE_DATA( 12, GLenum, type ); 37 39 WRITE_DATA( 16, GLsizei, stride ); 38 WRITE_DATA( 20, GL intptrARB, (GLintptrARB) pointer );40 WRITE_DATA( 20, GLuint, (GLuint) pointer ); 39 41 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 40 42 } … … 44 46 GET_PACKER_CONTEXT(pc); 45 47 unsigned char *data_ptr; 46 int packet_length = 2 0 + sizeof(GLintptrARB);48 int packet_length = 24; 47 49 GET_BUFFERED_POINTER( pc, packet_length ); 48 50 WRITE_DATA( 0, GLint, packet_length ); … … 51 53 WRITE_DATA( 12, GLenum, type ); 52 54 WRITE_DATA( 16, GLsizei, stride ); 53 WRITE_DATA( 20, GL intptrARB, (GLintptrARB) pointer );55 WRITE_DATA( 20, GLuint, (GLuint) pointer ); 54 56 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 55 57 } … … 59 61 GET_PACKER_CONTEXT(pc); 60 62 unsigned char *data_ptr; 61 int packet_length = 16 + sizeof(GLintptrARB);63 int packet_length = 20; 62 64 GET_BUFFERED_POINTER( pc, packet_length ); 63 65 WRITE_DATA( 0, GLint, packet_length ); … … 65 67 WRITE_DATA( 8, GLenum, type ); 66 68 WRITE_DATA( 12, GLsizei, stride ); 67 WRITE_DATA( 16, GL intptrARB, (GLintptrARB) pointer );69 WRITE_DATA( 16, GLuint, (GLuint) pointer ); 68 70 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 69 71 } … … 73 75 GET_PACKER_CONTEXT(pc); 74 76 unsigned char *data_ptr; 75 int packet_length = 2 0 + sizeof(GLintptrARB);77 int packet_length = 24; 76 78 GET_BUFFERED_POINTER( pc, packet_length ); 77 79 WRITE_DATA( 0, GLint, packet_length ); … … 80 82 WRITE_DATA( 12, GLenum, type ); 81 83 WRITE_DATA( 16, GLsizei, stride ); 82 WRITE_DATA( 20, GL intptrARB, (GLintptrARB) pointer );84 WRITE_DATA( 20, GLuint, (GLuint) pointer ); 83 85 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 84 86 } … … 88 90 GET_PACKER_CONTEXT(pc); 89 91 unsigned char *data_ptr; 90 int packet_length = 1 2 + sizeof(GLintptrARB);92 int packet_length = 16; 91 93 GET_BUFFERED_POINTER( pc, packet_length ); 92 94 WRITE_DATA( 0, GLint, packet_length ); 93 95 WRITE_DATA( 4, GLenum, CR_EDGEFLAGPOINTER_EXTEND_OPCODE ); 94 96 WRITE_DATA( 8, GLsizei, stride ); 95 WRITE_DATA( 12, GL intptrARB, (GLintptrARB) pointer );97 WRITE_DATA( 12, GLuint, (GLuint) pointer ); 96 98 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 97 99 } … … 101 103 GET_PACKER_CONTEXT(pc); 102 104 unsigned char *data_ptr; 103 int packet_length = 16 + sizeof(GLintptrARB);105 int packet_length = 20; 104 106 GET_BUFFERED_POINTER( pc, packet_length ); 105 107 WRITE_DATA( 0, GLint, packet_length ); … … 107 109 WRITE_DATA( 8, GLenum, type ); 108 110 WRITE_DATA( 12, GLsizei, stride ); 109 WRITE_DATA( 16, GL intptrARB, (GLintptrARB) pointer );111 WRITE_DATA( 16, GLuint, (GLuint) pointer ); 110 112 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 111 113 } … … 115 117 GET_PACKER_CONTEXT(pc); 116 118 unsigned char *data_ptr; 117 int packet_length = 2 0 + sizeof(GLintptrARB);119 int packet_length = 24; 118 120 GET_BUFFERED_POINTER( pc, packet_length ); 119 121 WRITE_DATA( 0, GLint, packet_length ); … … 122 124 WRITE_DATA( 12, GLenum, type ); 123 125 WRITE_DATA( 16, GLsizei, stride ); 124 WRITE_DATA( 20, GL intptrARB, (GLintptrARB) pointer );126 WRITE_DATA( 20, GLuint, (GLuint) pointer ); 125 127 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 126 128 } … … 130 132 GET_PACKER_CONTEXT(pc); 131 133 unsigned char *data_ptr; 132 int packet_length = 16 + sizeof(GLintptrARB);134 int packet_length = 20; 133 135 GET_BUFFERED_POINTER( pc, packet_length ); 134 136 WRITE_DATA( 0, GLint, packet_length ); … … 136 138 WRITE_DATA( 8, GLenum, type ); 137 139 WRITE_DATA( 12, GLsizei, stride ); 138 WRITE_DATA( 16, GL intptrARB, (GLintptrARB) pointer );140 WRITE_DATA( 16, GLuint, (GLuint) pointer ); 139 141 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 140 142 } … … 144 146 GET_PACKER_CONTEXT(pc); 145 147 unsigned char *data_ptr; 146 int packet_length = 28 + sizeof(GLintptrARB);148 int packet_length = 32; 147 149 GET_BUFFERED_POINTER( pc, packet_length ); 148 150 WRITE_DATA( 0, GLint, packet_length ); … … 153 155 WRITE_DATA( 20, GLboolean, normalized ); 154 156 WRITE_DATA( 24, GLsizei, stride ); 155 WRITE_DATA( 28, GL intptrARB, (GLintptrARB) pointer );157 WRITE_DATA( 28, GLuint, (GLuint) pointer ); 156 158 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 157 159 } … … 161 163 GET_PACKER_CONTEXT(pc); 162 164 unsigned char *data_ptr; 163 int packet_length = 2 4 + sizeof(GLintptrARB);165 int packet_length = 28; 164 166 GET_BUFFERED_POINTER( pc, packet_length ); 165 167 WRITE_DATA( 0, GLint, packet_length ); … … 169 171 WRITE_DATA( 16, GLenum, type ); 170 172 WRITE_DATA( 20, GLsizei, stride ); 171 WRITE_DATA( 24, GL intptrARB, (GLintptrARB) pointer );173 WRITE_DATA( 24, GLuint, (GLuint) pointer ); 172 174 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 173 175 } … … 177 179 GET_PACKER_CONTEXT(pc); 178 180 unsigned char *data_ptr; 179 int packet_length = 16 + sizeof(GLintptrARB);181 int packet_length = 20; 180 182 GET_BUFFERED_POINTER( pc, packet_length ); 181 183 WRITE_DATA( 0, GLint, packet_length ); … … 183 185 WRITE_DATA( 8, GLenum, format ); 184 186 WRITE_DATA( 12, GLsizei, stride ); 185 WRITE_DATA( 16, GL intptrARB, (GLintptrARB) pointer );187 WRITE_DATA( 16, GLuint, (GLuint) pointer ); 186 188 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 187 189 } -
trunk/src/VBox/GuestHost/OpenGL/packer/pack_bufferobject.c
r21309 r21422 41 41 42 42 packet_length = sizeof(GLenum) 43 + sizeof(target) + sizeof( size) + sizeof(usage) + sizeof(GLboolean);43 + sizeof(target) + sizeof(GLuint) + sizeof(usage) + sizeof(GLboolean); 44 44 45 45 /*Note: it's valid to pass a NULL pointer here, which tells GPU drivers to allocate memory for the VBO*/ … … 50 50 WRITE_DATA_AI(GLenum, CR_BUFFERDATAARB_EXTEND_OPCODE); 51 51 WRITE_DATA_AI(GLenum, target); 52 WRITE_DATA_AI(GL sizeiptrARB,size);52 WRITE_DATA_AI(GLuint, (GLuint) size); 53 53 WRITE_DATA_AI(GLenum, usage); 54 54 WRITE_DATA_AI(GLboolean, (GLboolean) (data!=NULL)); … … 72 72 73 73 packet_length = sizeof(GLenum) 74 + sizeof(target) + sizeof( offset) + sizeof(size) + size;74 + sizeof(target) + sizeof(GLuint) + sizeof(GLuint) + size; 75 75 76 76 start_ptr = data_ptr = (unsigned char *) crPackAlloc(packet_length); 77 77 WRITE_DATA_AI(GLenum, CR_BUFFERSUBDATAARB_EXTEND_OPCODE); 78 78 WRITE_DATA_AI(GLenum, target); 79 WRITE_DATA_AI(GL intptrARB,offset);80 WRITE_DATA_AI(GL sizeiptrARB,size);79 WRITE_DATA_AI(GLuint, (GLuint) offset); 80 WRITE_DATA_AI(GLuint, (GLuint) size); 81 81 crMemcpy(data_ptr, data, size); 82 82 … … 85 85 } 86 86 87 void PACK_APIENTRY 88 crPackGetBufferSubDataARB( GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data, int * writeback ) 89 { 90 GET_PACKER_CONTEXT(pc); 91 unsigned char *data_ptr; 92 (void) pc; 93 GET_BUFFERED_POINTER( pc, 36 ); 94 WRITE_DATA( 0, GLint, 36 ); 95 WRITE_DATA( 4, GLenum, CR_GETBUFFERSUBDATAARB_EXTEND_OPCODE ); 96 WRITE_DATA( 8, GLenum, target ); 97 WRITE_DATA( 12, GLuint, (GLuint) offset ); 98 WRITE_DATA( 16, GLuint, (GLuint) size ); 99 WRITE_NETWORK_POINTER( 20, (void *) data ); 100 WRITE_NETWORK_POINTER( 28, (void *) writeback ); 101 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 102 } 87 103 88 104 void PACK_APIENTRY -
trunk/src/VBox/GuestHost/OpenGL/packer/pack_client.c
r21308 r21422 464 464 { 465 465 unsigned char *data_ptr, *start_ptr; 466 int packet_length = sizeof(int) + sizeof(mode) + sizeof(count) + sizeof(type) + sizeof(GL intptrARB);466 int packet_length = sizeof(int) + sizeof(mode) + sizeof(count) + sizeof(type) + sizeof(GLuint); 467 467 GLsizei indexsize; 468 468 #ifdef CR_ARB_vertex_buffer_object … … 492 492 WRITE_DATA_AI(GLsizei, count); 493 493 WRITE_DATA_AI(GLenum, type); 494 WRITE_DATA_AI(GL sizeiptrARB, (GLsizeiptrARB) indices );495 #ifdef CR_ARB_vertex_buffer_object 496 WRITE_DATA_AI(GLboolean, (GLboolean) indexsize>0);494 WRITE_DATA_AI(GLuint, (GLuint) indices ); 495 #ifdef CR_ARB_vertex_buffer_object 496 WRITE_DATA_AI(GLboolean, (GLboolean)(indexsize>0)); 497 497 #endif 498 498 if (indexsize>0) … … 510 510 unsigned char *data_ptr, *start_ptr; 511 511 int packet_length = sizeof(int) + sizeof(mode) + sizeof(start) 512 + sizeof(end) + sizeof(count) + sizeof(type) + sizeof(GL intptrARB);512 + sizeof(end) + sizeof(count) + sizeof(type) + sizeof(GLuint); 513 513 GLsizei indexsize; 514 514 … … 541 541 WRITE_DATA_AI(GLsizei, count); 542 542 WRITE_DATA_AI(GLenum, type); 543 WRITE_DATA_AI(GL sizeiptrARB, (GLsizeiptr) indices);544 #ifdef CR_ARB_vertex_buffer_object 545 WRITE_DATA_AI(GLboolean, (GLboolean) indexsize>0);543 WRITE_DATA_AI(GLuint, (GLuint) indices); 544 #ifdef CR_ARB_vertex_buffer_object 545 WRITE_DATA_AI(GLboolean, (GLboolean) (indexsize>0)); 546 546 #endif 547 547 if (indexsize>0) -
trunk/src/VBox/GuestHost/OpenGL/packer/packer_special
r20467 r21422 165 165 GetAttachedObjectsARB 166 166 GetInfoLogARB 167 GetBufferSubDataARB
Note:
See TracChangeset
for help on using the changeset viewer.