VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_program.cpp@ 78191

Last change on this file since 78191 was 78190, checked in by vboxsync, 6 years ago

Merge first stage of the Chromium cleanup from the branch:

  • r129818 (Remove VBOX_WITH_CR_DISPLAY_LISTS and accompanying code as it was disabled since r108676 and was never brought back (see ​bugref:3456 and ​bugref:8485))
  • r129819 (HostServices/SharedOpenGL: Remove unused main entry point from upstream server process based implementation)
  • r129820 (HostServices/SharedOpenGL: Started eliminating all backends other than HGCM. They are not used and probably wouldn't work anymore anyway)
  • r129821 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill crTimer* API as it is not used anywhere)
  • r129822 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill most from cr_process.h apart from two used methods)
  • r129823 (HostServices/SharedOpenGL,GuestHost/OpenGLAdditions/common/crOpenGL: Kill crList* API as it is unused)
  • r129824 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill crHullInteriorBox API as it is unused)
  • r129825 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill crWarpPoint API as it is unused)
  • r129826 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill CrSa* API as it is unused and not even compiled in)
  • r129827 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Kill cr_bbox.h as it is unused)
  • r129828 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove a few crParseUrl() two uses)
  • r129829 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove last crParseURL() use)
  • r129830 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove crParseURL())
  • r129831 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove VBOX_WITH_COCOA_QT and related code when not set as it is the default for years now and we don't support anything else anymore)
  • r129832 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_logo.h)
  • r129833 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused crut_api.h and crut_clientapi.h)
  • r129834 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_dmx.h)
  • r129835 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused cr_perf.h)
  • r129836 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove cr_rand.h and friends as it is not actively used anywhere)
  • r129837 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of all the swapped versions in the packer SPU, we never change endianess from guest to host and don't need it)
  • r129838 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129839 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129840 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused pack_pica.c)
  • r129841 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove more swapper versions in the packer related code)
  • r129842 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of cr_endianess.h and friends)
  • r129843 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused lowercase.py)
  • r129844 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused cr_calllists.h and friends)
  • r129845 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of completely unused idpool.c, not even compiled in)
  • r129846 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused cr_debugopcodes.h and friends)
  • r129847 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Make the cr_mem.h API inline and get rid of the implementation in the util library)
  • r129848 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of SPUOptions and related code as it is of no use for us)
  • r129849 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of cr_environment.h and friends and convert usage to RTEnv* APIs)
  • r129850 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of unused renderspu_agl.c)
  • r129851 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Remove unused code in cr_htable.h)
  • r129853 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Introduce a state paremeter for the unpacker workers instead of reyling on global variables, work in progress)
  • r129854 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Let the caller of crUnpack set up the initial state. This allows to get rid of the global return_ptr and writeback_ptr as they get supplied in the unpacker state by the server)
  • r129855 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of the cr_lastDispatch and cr_unpackDispatch as they are of no use now)
  • r129856 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Get rid of the global cr_unpackData and cr_unpackDataEnd symbols by indtroducing another hack to make it possible for certail server dispatch callbacks to access the data buffer)
  • r129857 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: build fix for release builds)
  • r129858 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Make the pointer to the unpacker state non const (is required for the access verification))
  • r129859 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: First iteration of the buffer size validation to prevent out of bound read access + added todos for places where additional checks are needed)
  • r129860 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129861 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129871 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129872 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Stop as soon as the unpacker encountered an error)
  • r129876 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129880 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Working on remaining verification todos)
  • r129882 (HostServices/SharedOpenGL,GuestHost/OpenGL,Additions/common/crOpenGL: Fixed some offsets in unpack_texture.c, 3DMark03 renders correctly again)
  • r130013 (HostServices/SharedOpenGL: Convert files to C++ so we can use C99 featuers on Windows with cl.exe)
  • r130014 (HostServices/SharedOpenGL,GuestHost/OpenGL: WIndows build fixes)
  • r130015 (HostServices/SharedOpenGL,GuestHost/OpenGL: More Windows build fixes)
  • r130036 (Config.kmk: Fix linker error on Windows by temporarily disabling the use of VBoxGuestR3DllMinW2K)
  • r130094 (src/VBox/GuestHost/OpenGL: Revert inlining the allocation/free functions in R3 completely as it doesn't work on Windows if memory is allocated and freed across different DLLs which don't share a common CRT, causes crashes in RtlValidtaeHeap())
  • r130095 (src/VBox/GuestHost/OpenGL,src/VBox/Additions/common/crOpenGL/pack: Don't use floating point specifiers in packspu_GetString() to avoid R6002 errors (couldn't fully understand why they occur suddenly after the rework but this gets rid of it))
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 14.7 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 "unpacker.h"
8#include "cr_error.h"
9#include "cr_protocol.h"
10#include "cr_mem.h"
11#include "cr_version.h"
12
13
14void crUnpackExtendProgramParameter4dvNV(PCrUnpackerState pState)
15{
16 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
17
18 GLenum target = READ_DATA(pState, 8, GLenum);
19 GLuint index = READ_DATA(pState, 12, GLuint);
20 GLdouble params[4];
21 params[0] = READ_DOUBLE(pState, 16);
22 params[1] = READ_DOUBLE(pState, 24);
23 params[2] = READ_DOUBLE(pState, 32);
24 params[3] = READ_DOUBLE(pState, 40);
25 pState->pDispatchTbl->ProgramParameter4dvNV(target, index, params);
26}
27
28
29void crUnpackExtendProgramParameter4fvNV(PCrUnpackerState pState)
30{
31 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
32
33 GLenum target = READ_DATA(pState, 8, GLenum);
34 GLuint index = READ_DATA(pState, 12, GLuint);
35 GLfloat params[4];
36 params[0] = READ_DATA(pState, 16, GLfloat);
37 params[1] = READ_DATA(pState, 20, GLfloat);
38 params[2] = READ_DATA(pState, 24, GLfloat);
39 params[3] = READ_DATA(pState, 28, GLfloat);
40 pState->pDispatchTbl->ProgramParameter4fvNV(target, index, params);
41}
42
43
44void crUnpackExtendProgramParameters4dvNV(PCrUnpackerState pState)
45{
46 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLuint);
47
48 GLenum target = READ_DATA(pState, 8, GLenum);
49 GLuint index = READ_DATA(pState, 12, GLuint);
50 GLuint num = READ_DATA(pState, 16, GLuint);
51
52 if (num <= 0 || num >= INT32_MAX / (4 * sizeof(GLdouble)))
53 {
54 crError("crUnpackExtendProgramParameters4dvNV: parameter 'num' is out of range");
55 pState->rcUnpack = VERR_INVALID_PARAMETER;
56 return;
57 }
58
59 GLdouble *params = DATA_POINTER(pState, 20, GLdouble);
60 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, params, 4 * num, GLdouble);
61
62 pState->pDispatchTbl->ProgramParameters4dvNV(target, index, num, params);
63}
64
65
66void crUnpackExtendProgramParameters4fvNV(PCrUnpackerState pState)
67{
68 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLuint);
69
70 GLenum target = READ_DATA(pState, 8, GLenum);
71 GLuint index = READ_DATA(pState, 12, GLuint);
72 GLuint num = READ_DATA(pState, 16, GLuint);
73
74 if (num <= 0 || num >= INT32_MAX / (4 * sizeof(GLfloat)))
75 {
76 crError("crUnpackExtendProgramParameters4fvNV: parameter 'num' is out of range");
77 pState->rcUnpack = VERR_INVALID_PARAMETER;
78 return;
79 }
80
81 GLfloat *params = DATA_POINTER(pState, 20, GLfloat);
82 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, params, 4 * num, GLfloat);
83
84 pState->pDispatchTbl->ProgramParameters4fvNV(target, index, num, params);
85}
86
87
88void crUnpackExtendAreProgramsResidentNV(PCrUnpackerState pState)
89{
90 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 8, GLsizei);
91 GLsizei n = READ_DATA(pState, 8, GLsizei);
92 const GLuint *programs = DATA_POINTER(pState, 12, const GLuint);
93
94 if (n <= 0 || n >= INT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK(pState, 20 + n * sizeof(GLuint)))
95 {
96 crError("crUnpackExtendAreProgramsResidentNV: %d is out of range", n);
97 pState->rcUnpack = VERR_INVALID_PARAMETER;
98 return;
99 }
100 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, programs, n, GLuint);
101 CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, 20 + n * sizeof(GLuint), CRNetworkPointer);
102
103 SET_RETURN_PTR(pState, 12 + n * sizeof(GLuint));
104 SET_WRITEBACK_PTR(pState, 20 + n * sizeof(GLuint));
105 (void) pState->pDispatchTbl->AreProgramsResidentNV(n, programs, NULL);
106}
107
108
109void crUnpackExtendLoadProgramNV(PCrUnpackerState pState)
110{
111 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLsizei);
112
113 GLenum target = READ_DATA(pState, 8, GLenum);
114 GLuint id = READ_DATA(pState, 12, GLuint);
115 GLsizei len = READ_DATA(pState, 16, GLsizei);
116
117 GLvoid *program = DATA_POINTER(pState, 20, GLvoid);
118 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, program, len, GLubyte);
119 pState->pDispatchTbl->LoadProgramNV(target, id, len, (GLubyte *)program);
120}
121
122
123void crUnpackExtendExecuteProgramNV(PCrUnpackerState pState)
124{
125 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 20, GLfloat);
126
127 GLenum target = READ_DATA(pState, 8, GLenum);
128 GLuint id = READ_DATA(pState, 12, GLuint);
129 GLfloat params[4];
130 params[0] = READ_DATA(pState, 16, GLfloat);
131 params[1] = READ_DATA(pState, 20, GLfloat);
132 params[2] = READ_DATA(pState, 24, GLfloat);
133 params[3] = READ_DATA(pState, 28, GLfloat);
134 pState->pDispatchTbl->ExecuteProgramNV(target, id, params);
135}
136
137void crUnpackExtendRequestResidentProgramsNV(PCrUnpackerState pState)
138{
139 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 8, GLsizei);
140
141 GLsizei n = READ_DATA(pState, 8, GLsizei);
142 crError("RequestResidentProgramsNV needs to be special cased!");
143 pState->pDispatchTbl->RequestResidentProgramsNV(n, NULL);
144}
145
146
147void crUnpackExtendProgramLocalParameter4fvARB(PCrUnpackerState pState)
148{
149 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
150
151 GLenum target = READ_DATA(pState, 8, GLenum);
152 GLuint index = READ_DATA(pState, 12, GLuint);
153 GLfloat params[4];
154 params[0] = READ_DATA(pState, 16, GLfloat);
155 params[1] = READ_DATA(pState, 20, GLfloat);
156 params[2] = READ_DATA(pState, 24, GLfloat);
157 params[3] = READ_DATA(pState, 28, GLfloat);
158 pState->pDispatchTbl->ProgramLocalParameter4fvARB(target, index, params);
159}
160
161
162void crUnpackExtendProgramLocalParameter4dvARB(PCrUnpackerState pState)
163{
164 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
165
166 GLenum target = READ_DATA(pState, 8, GLenum);
167 GLuint index = READ_DATA(pState, 12, GLuint);
168 GLdouble params[4];
169 params[0] = READ_DOUBLE(pState, 16);
170 params[1] = READ_DOUBLE(pState, 24);
171 params[2] = READ_DOUBLE(pState, 32);
172 params[3] = READ_DOUBLE(pState, 40);
173 pState->pDispatchTbl->ProgramLocalParameter4dvARB(target, index, params);
174}
175
176
177
178void crUnpackExtendProgramNamedParameter4dvNV(PCrUnpackerState pState)
179{
180 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
181
182 GLuint id = READ_DATA(pState, 8, GLuint);
183 GLsizei len = READ_DATA(pState, 12, GLsizei);
184 GLdouble *params = DATA_POINTER(pState, 16, GLdouble);
185 GLubyte *name = DATA_POINTER(pState, 48, GLubyte);
186 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
187 pState->pDispatchTbl->ProgramNamedParameter4dvNV(id, len, name, params);
188}
189
190void crUnpackExtendProgramNamedParameter4dNV(PCrUnpackerState pState)
191{
192 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
193
194 GLuint id = READ_DATA(pState, 8, GLuint);
195 GLsizei len = READ_DATA(pState, 12, GLsizei);
196 GLdouble params[4];
197 params[0] = READ_DOUBLE(pState, 16);
198 params[1] = READ_DOUBLE(pState, 24);
199 params[2] = READ_DOUBLE(pState, 32);
200 params[3] = READ_DOUBLE(pState, 40);
201
202 GLubyte *name = DATA_POINTER(pState, 48, GLubyte);
203 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
204 pState->pDispatchTbl->ProgramNamedParameter4dNV(id, len, name, params[0], params[1], params[2], params[3]);
205}
206
207void crUnpackExtendProgramNamedParameter4fNV(PCrUnpackerState pState)
208{
209 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
210
211 GLenum id = READ_DATA(pState, 8, GLuint);
212 GLsizei len = READ_DATA(pState, 12, GLsizei);
213 GLfloat params[4];
214 params[0] = READ_DATA(pState, 16, GLfloat);
215 params[1] = READ_DATA(pState, 20, GLfloat);
216 params[2] = READ_DATA(pState, 24, GLfloat);
217 params[3] = READ_DATA(pState, 28, GLfloat);
218
219 GLubyte *name = DATA_POINTER(pState, 32, GLubyte);
220 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
221 pState->pDispatchTbl->ProgramNamedParameter4fNV(id, len, name, params[0], params[1], params[2], params[3]);
222}
223
224void crUnpackExtendProgramNamedParameter4fvNV(PCrUnpackerState pState)
225{
226 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
227
228 GLenum id = READ_DATA(pState, 8, GLuint);
229 GLsizei len = READ_DATA(pState, 12, GLsizei);
230 GLfloat *params = DATA_POINTER(pState, 16, GLfloat);
231 GLubyte *name = DATA_POINTER(pState, 32, GLubyte);
232
233 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
234 pState->pDispatchTbl->ProgramNamedParameter4fvNV(id, len, name, params);
235}
236
237void crUnpackExtendGetProgramNamedParameterdvNV(PCrUnpackerState pState)
238{
239 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 12, GLsizei);
240
241 GLuint id = READ_DATA(pState, 8, GLuint);
242 GLsizei len = READ_DATA(pState, 12, GLsizei);
243 const GLubyte *name = DATA_POINTER(pState, 16, GLubyte);
244
245 if (len <= 0 || len >= INT32_MAX / 4)
246 {
247 crError("crUnpackExtendGetProgramNamedParameterdvNV: len %d is out of range", len);
248 pState->rcUnpack = VERR_INVALID_PARAMETER;
249 return;
250 }
251 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
252 CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, 16 + len + sizeof(CRNetworkPointer), CRNetworkPointer);
253
254 SET_RETURN_PTR(pState, 16+len);
255 SET_WRITEBACK_PTR(pState, 16+len+8);
256 pState->pDispatchTbl->GetProgramNamedParameterdvNV(id, len, name, NULL);
257}
258
259void crUnpackExtendGetProgramNamedParameterfvNV(PCrUnpackerState pState)
260{
261 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 12, GLsizei);
262
263 GLuint id = READ_DATA(pState, 8, GLuint);
264 GLsizei len = READ_DATA(pState, 12, GLsizei);
265 const GLubyte *name = DATA_POINTER(pState, 16, GLubyte);
266
267 if (len <= 0 || len >= INT32_MAX / 4)
268 {
269 crError("crUnpackExtendGetProgramNamedParameterfvNV: len %d is out of range", len);
270 pState->rcUnpack = VERR_INVALID_PARAMETER;
271 return;
272 }
273
274 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
275 CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, 16 + len + sizeof(CRNetworkPointer), CRNetworkPointer);
276 SET_RETURN_PTR(pState, 16+len);
277 SET_WRITEBACK_PTR(pState, 16+len+8);
278 pState->pDispatchTbl->GetProgramNamedParameterfvNV(id, len, name, NULL);
279}
280
281void crUnpackExtendProgramStringARB(PCrUnpackerState pState)
282{
283 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLsizei);
284
285 GLenum target = READ_DATA(pState, 8, GLenum);
286 GLenum format = READ_DATA(pState, 12, GLuint);
287 GLsizei len = READ_DATA(pState, 16, GLsizei);
288 GLvoid *program = DATA_POINTER(pState, 20, GLvoid);
289
290 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, program, len, GLubyte);
291 pState->pDispatchTbl->ProgramStringARB(target, format, len, program);
292}
293
294void crUnpackExtendGetProgramStringARB(PCrUnpackerState pState)
295{
296}
297
298void crUnpackExtendProgramEnvParameter4dvARB(PCrUnpackerState pState)
299{
300 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
301
302 GLenum target = READ_DATA(pState, 8, GLenum);
303 GLuint index = READ_DATA(pState, 12, GLuint);
304 GLdouble params[4];
305 params[0] = READ_DOUBLE(pState, 16);
306 params[1] = READ_DOUBLE(pState, 24);
307 params[2] = READ_DOUBLE(pState, 32);
308 params[3] = READ_DOUBLE(pState, 40);
309 pState->pDispatchTbl->ProgramEnvParameter4dvARB(target, index, params);
310}
311
312void crUnpackExtendProgramEnvParameter4fvARB(PCrUnpackerState pState)
313{
314 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
315
316 GLenum target = READ_DATA(pState, 8, GLenum);
317 GLuint index = READ_DATA(pState, 12, GLuint);
318 GLfloat params[4];
319 params[0] = READ_DATA(pState, 16, GLfloat);
320 params[1] = READ_DATA(pState, 20, GLfloat);
321 params[2] = READ_DATA(pState, 24, GLfloat);
322 params[3] = READ_DATA(pState, 28, GLfloat);
323 pState->pDispatchTbl->ProgramEnvParameter4fvARB(target, index, params);
324}
325
326void crUnpackExtendDeleteProgramsARB(PCrUnpackerState pState)
327{
328 CHECK_BUFFER_SIZE_STATIC_LAST(pState, 8, GLsizei);
329
330 GLsizei n = READ_DATA(pState, 8, GLsizei);
331 const GLuint *programs = DATA_POINTER(pState, 12, GLuint);
332
333 CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, programs, n, GLuint);
334 pState->pDispatchTbl->DeleteProgramsARB(n, programs);
335}
336
337void crUnpackVertexAttrib4NbvARB(PCrUnpackerState pState)
338{
339 CHECK_BUFFER_SIZE_STATIC(pState, 8);
340
341 GLuint index = READ_DATA(pState, 0, GLuint);
342 const GLbyte *v = DATA_POINTER(pState, 4, const GLbyte);
343
344 pState->pDispatchTbl->VertexAttrib4NbvARB(index, v);
345 INCR_DATA_PTR(pState, 8);
346}
347
348void crUnpackVertexAttrib4NivARB(PCrUnpackerState pState)
349{
350 CHECK_BUFFER_SIZE_STATIC(pState, 20);
351
352 GLuint index = READ_DATA(pState, 0, GLuint);
353 const GLint *v = DATA_POINTER(pState, 4, const GLint);
354
355 pState->pDispatchTbl->VertexAttrib4NivARB(index, v);
356 INCR_DATA_PTR(pState, 20);
357}
358
359void crUnpackVertexAttrib4NsvARB(PCrUnpackerState pState)
360{
361 CHECK_BUFFER_SIZE_STATIC(pState, 12);
362
363 GLuint index = READ_DATA(pState, 0, GLuint);
364 const GLshort *v = DATA_POINTER(pState, 4, const GLshort);
365
366 pState->pDispatchTbl->VertexAttrib4NsvARB(index, v);
367 INCR_DATA_PTR(pState, 12);
368}
369
370void crUnpackVertexAttrib4NubvARB(PCrUnpackerState pState)
371{
372 CHECK_BUFFER_SIZE_STATIC(pState, 8);
373
374 GLuint index = READ_DATA(pState, 0, GLuint);
375 const GLubyte *v = DATA_POINTER(pState, 4, const GLubyte);
376
377 pState->pDispatchTbl->VertexAttrib4NubvARB(index, v);
378 INCR_DATA_PTR(pState, 8);
379}
380
381void crUnpackVertexAttrib4NuivARB(PCrUnpackerState pState)
382{
383 CHECK_BUFFER_SIZE_STATIC(pState, 20);
384
385 GLuint index = READ_DATA(pState, 0, GLuint);
386 const GLuint *v = DATA_POINTER(pState, 4, const GLuint);
387
388 pState->pDispatchTbl->VertexAttrib4NuivARB(index, v);
389 INCR_DATA_PTR(pState, 20);
390}
391
392void crUnpackVertexAttrib4NusvARB(PCrUnpackerState pState)
393{
394 CHECK_BUFFER_SIZE_STATIC(pState, 12);
395
396 GLuint index = READ_DATA(pState, 0, GLuint);
397 const GLushort *v = DATA_POINTER(pState, 4, const GLushort);
398
399 pState->pDispatchTbl->VertexAttrib4NusvARB(index, v);
400 INCR_DATA_PTR(pState, 12);
401}
402
403void crUnpackVertexAttrib4bvARB(PCrUnpackerState pState)
404{
405 CHECK_BUFFER_SIZE_STATIC(pState, 8);
406
407 GLuint index = READ_DATA(pState, 0, GLuint);
408 const GLbyte *v = DATA_POINTER(pState, 4, const GLbyte);
409
410 pState->pDispatchTbl->VertexAttrib4bvARB(index, v);
411 INCR_DATA_PTR(pState, 8);
412}
413
414void crUnpackVertexAttrib4ivARB(PCrUnpackerState pState)
415{
416 CHECK_BUFFER_SIZE_STATIC(pState, 20);
417
418 GLuint index = READ_DATA(pState, 0, GLuint);
419 const GLint *v = DATA_POINTER(pState, 4, const GLint);
420
421 pState->pDispatchTbl->VertexAttrib4ivARB(index, v);
422 INCR_DATA_PTR(pState, 20);
423}
424
425void crUnpackVertexAttrib4ubvARB(PCrUnpackerState pState)
426{
427 CHECK_BUFFER_SIZE_STATIC(pState, 8);
428
429 GLuint index = READ_DATA(pState, 0, GLuint);
430 const GLubyte *v = DATA_POINTER(pState, 4, const GLubyte);
431
432 pState->pDispatchTbl->VertexAttrib4ubvARB(index, v);
433 INCR_DATA_PTR(pState, 8);
434}
435
436void crUnpackVertexAttrib4uivARB(PCrUnpackerState pState)
437{
438 CHECK_BUFFER_SIZE_STATIC(pState, 20);
439
440 GLuint index = READ_DATA(pState, 0, GLuint);
441 const GLuint *v = DATA_POINTER(pState, 4, const GLuint);
442
443 pState->pDispatchTbl->VertexAttrib4uivARB(index, v);
444 INCR_DATA_PTR(pState, 20);
445}
446
447void crUnpackVertexAttrib4usvARB(PCrUnpackerState pState)
448{
449 CHECK_BUFFER_SIZE_STATIC(pState, 12);
450
451 GLuint index = READ_DATA(pState, 0, GLuint);
452 const GLushort *v = DATA_POINTER(pState, 4, const GLushort);
453
454 pState->pDispatchTbl->VertexAttrib4usvARB(index, v);
455 INCR_DATA_PTR(pState, 12);
456}
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