Mark a couple more function parameters as counters.
This commit is contained in:
parent
82e22f50f1
commit
6398a97aff
|
@ -273,7 +273,7 @@ __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
||||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||||
const GLuint compsize = __glCallLists_size(type);
|
const GLuint compsize = __glCallLists_size(type);
|
||||||
const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
|
const GLuint cmdlen = 12 + __GLX_PAD((compsize * n));
|
||||||
if (__builtin_expect(gc->currentDpy != NULL, 1)) {
|
if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) {
|
||||||
if (cmdlen <= gc->maxSmallRenderCommandSize) {
|
if (cmdlen <= gc->maxSmallRenderCommandSize) {
|
||||||
if ( (gc->pc + cmdlen) > gc->bufEnd ) {
|
if ( (gc->pc + cmdlen) > gc->bufEnd ) {
|
||||||
(void) __glXFlushRenderBuffer(gc, gc->pc);
|
(void) __glXFlushRenderBuffer(gc, gc->pc);
|
||||||
|
@ -4030,7 +4030,7 @@ __indirect_glGenTextures(GLsizei n, GLuint * textures)
|
||||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||||
Display * const dpy = gc->currentDpy;
|
Display * const dpy = gc->currentDpy;
|
||||||
const GLuint cmdlen = 4;
|
const GLuint cmdlen = 4;
|
||||||
if (__builtin_expect(dpy != NULL, 1)) {
|
if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
|
||||||
GLubyte const * pc = setup_single_request(gc, X_GLsop_GenTextures, cmdlen);
|
GLubyte const * pc = setup_single_request(gc, X_GLsop_GenTextures, cmdlen);
|
||||||
(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
|
(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
|
||||||
(void) read_reply(dpy, 4, textures, GL_TRUE);
|
(void) read_reply(dpy, 4, textures, GL_TRUE);
|
||||||
|
@ -5285,7 +5285,7 @@ __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures)
|
||||||
__GLXcontext * const gc = __glXGetCurrentContext();
|
__GLXcontext * const gc = __glXGetCurrentContext();
|
||||||
Display * const dpy = gc->currentDpy;
|
Display * const dpy = gc->currentDpy;
|
||||||
const GLuint cmdlen = 4;
|
const GLuint cmdlen = 4;
|
||||||
if (__builtin_expect(dpy != NULL, 1)) {
|
if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) {
|
||||||
GLubyte const * pc = setup_vendor_request(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
|
GLubyte const * pc = setup_vendor_request(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen);
|
||||||
(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
|
(void) memcpy((void *)(pc + 0), (void *)(&n), 4);
|
||||||
(void) read_reply(dpy, 4, textures, GL_TRUE);
|
(void) read_reply(dpy, 4, textures, GL_TRUE);
|
||||||
|
|
|
@ -844,7 +844,7 @@ glx:
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="CallLists" offset="3">
|
<function name="CallLists" offset="3">
|
||||||
<param name="n" type="GLsizei"/>
|
<param name="n" type="GLsizei" counter="true"/>
|
||||||
<param name="type" type="GLenum"/>
|
<param name="type" type="GLenum"/>
|
||||||
<param name="lists" type="const GLvoid *" variable_param="type" count="n"/>
|
<param name="lists" type="const GLvoid *" variable_param="type" count="n"/>
|
||||||
<glx rop="2" large="true"/>
|
<glx rop="2" large="true"/>
|
||||||
|
@ -2988,7 +2988,7 @@ glx:
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="GenTextures" offset="328">
|
<function name="GenTextures" offset="328">
|
||||||
<param name="n" type="GLsizei"/>
|
<param name="n" type="GLsizei" counter="true"/>
|
||||||
<param name="textures" type="GLuint *" output="true"/>
|
<param name="textures" type="GLuint *" output="true"/>
|
||||||
<glx sop="145" always_array="true"/>
|
<glx sop="145" always_array="true"/>
|
||||||
</function>
|
</function>
|
||||||
|
@ -7026,7 +7026,7 @@ glx:
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="GenTexturesEXT" offset="440">
|
<function name="GenTexturesEXT" offset="440">
|
||||||
<param name="n" type="GLsizei"/>
|
<param name="n" type="GLsizei" counter="true"/>
|
||||||
<param name="textures" type="GLuint *" output="true"/>
|
<param name="textures" type="GLuint *" output="true"/>
|
||||||
<glx vendorpriv="13" always_array="true"/>
|
<glx vendorpriv="13" always_array="true"/>
|
||||||
</function>
|
</function>
|
||||||
|
|
Loading…
Reference in New Issue