VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c@ 78105

最後變更 在這個檔案從78105是 78105,由 vboxsync 提交於 6 年 前

GuestHost/OpenGL,HostServices/SharedOpenGL: Updates bugref:9407

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 2.4 KB
 
1/*
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#include "unpacker.h"
8
9void crUnpackExtendChromiumParametervCR( void )
10{
11 GLenum target = READ_DATA( 8, GLenum );
12 GLenum type = READ_DATA( 12, GLenum );
13 GLsizei count = READ_DATA( 16, GLsizei );
14 GLvoid *values = DATA_POINTER( 20, GLvoid );
15
16 cr_unpackDispatch.ChromiumParametervCR(target, type, count, values);
17
18
19 /*
20 INCR_VAR_PTR();
21 */
22}
23
24void crUnpackExtendDeleteQueriesARB(void)
25{
26 GLsizei n = READ_DATA( 8, GLsizei );
27 const GLuint *ids = DATA_POINTER(12, GLuint);
28
29 if (n <= 0 || n >= INT32_MAX / sizeof(GLint) / 4 || !DATA_POINTER_CHECK(12 + n * sizeof(GLuint)))
30 {
31 crError("crUnpackExtendDeleteQueriesARB: parameter 'n' is out of range");
32 return;
33 }
34
35 cr_unpackDispatch.DeleteQueriesARB(n, ids);
36}
37
38void crUnpackExtendGetPolygonStipple(void)
39{
40 GLubyte *mask;
41
42 SET_RETURN_PTR( 8 );
43 SET_WRITEBACK_PTR( 16 );
44 mask = DATA_POINTER(8, GLubyte);
45
46 cr_unpackDispatch.GetPolygonStipple( mask );
47}
48
49void crUnpackExtendGetPixelMapfv(void)
50{
51 GLenum map = READ_DATA( 8, GLenum );
52 GLfloat *values;
53
54 SET_RETURN_PTR( 12 );
55 SET_WRITEBACK_PTR( 20 );
56 values = DATA_POINTER(12, GLfloat);
57
58 cr_unpackDispatch.GetPixelMapfv( map, values );
59}
60
61void crUnpackExtendGetPixelMapuiv(void)
62{
63 GLenum map = READ_DATA( 8, GLenum );
64 GLuint *values;
65
66 SET_RETURN_PTR( 12 );
67 SET_WRITEBACK_PTR( 20 );
68 values = DATA_POINTER(12, GLuint);
69
70 cr_unpackDispatch.GetPixelMapuiv( map, values );
71}
72
73void crUnpackExtendGetPixelMapusv(void)
74{
75 GLenum map = READ_DATA( 8, GLenum );
76 GLushort *values;
77
78 SET_RETURN_PTR( 12 );
79 SET_WRITEBACK_PTR( 20 );
80 values = DATA_POINTER(12, GLushort);
81
82 cr_unpackDispatch.GetPixelMapusv( map, values );
83}
84
85void crUnpackExtendVBoxTexPresent(void)
86{
87 GLuint texture = READ_DATA( 8, GLuint );
88 GLuint cfg = READ_DATA( 12, GLuint );
89 GLint xPos = READ_DATA( 16, GLint );
90 GLint yPos = READ_DATA( 20, GLint );
91 GLint cRects = READ_DATA( 24, GLint );
92 GLint *pRects = (GLint *)DATA_POINTER( 28, GLvoid );
93
94 if (cRects <= 0 || cRects >= INT32_MAX / sizeof(GLint) / 8 || !DATA_POINTER_CHECK(28 + 4 * cRects * sizeof(GLint)))
95 {
96 crError("crUnpackExtendVBoxTexPresent: parameter 'cRects' is out of range");
97 return;
98 }
99
100 cr_unpackDispatch.VBoxTexPresent( texture, cfg, xPos, yPos, cRects, pRects );
101}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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