glx: Remove True/False defines
Those are xlib spellings, we say TRUE/FALSE pretty consistently elsewhere in the server. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
8e3b26ceaa
commit
51bab63b73
|
@ -37,29 +37,29 @@ static Bool
|
||||||
validate_GL_version(int major_version, int minor_version)
|
validate_GL_version(int major_version, int minor_version)
|
||||||
{
|
{
|
||||||
if (major_version <= 0 || minor_version < 0)
|
if (major_version <= 0 || minor_version < 0)
|
||||||
return False;
|
return FALSE;
|
||||||
|
|
||||||
switch (major_version) {
|
switch (major_version) {
|
||||||
case 1:
|
case 1:
|
||||||
if (minor_version > 5)
|
if (minor_version > 5)
|
||||||
return False;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (minor_version > 1)
|
if (minor_version > 1)
|
||||||
return False;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if (minor_version > 3)
|
if (minor_version > 3)
|
||||||
return False;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return True;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
@ -70,9 +70,9 @@ validate_render_type(uint32_t render_type)
|
||||||
case GLX_COLOR_INDEX_TYPE:
|
case GLX_COLOR_INDEX_TYPE:
|
||||||
case GLX_RGBA_FLOAT_TYPE_ARB:
|
case GLX_RGBA_FLOAT_TYPE_ARB:
|
||||||
case GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT:
|
case GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT:
|
||||||
return True;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
|
||||||
ctx->config = config;
|
ctx->config = config;
|
||||||
ctx->id = req->context;
|
ctx->id = req->context;
|
||||||
ctx->share_id = req->shareList;
|
ctx->share_id = req->shareList;
|
||||||
ctx->idExists = True;
|
ctx->idExists = TRUE;
|
||||||
ctx->isDirect = req->isDirect;
|
ctx->isDirect = req->isDirect;
|
||||||
ctx->renderMode = GL_RENDER;
|
ctx->renderMode = GL_RENDER;
|
||||||
ctx->resetNotificationStrategy = reset;
|
ctx->resetNotificationStrategy = reset;
|
||||||
|
|
|
@ -344,11 +344,11 @@ dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
if (num_attribs == 0)
|
if (num_attribs == 0)
|
||||||
return True;
|
return TRUE;
|
||||||
|
|
||||||
if (attribs == NULL) {
|
if (attribs == NULL) {
|
||||||
*error = BadImplementation;
|
*error = BadImplementation;
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*major_ver = 1;
|
*major_ver = 1;
|
||||||
|
@ -381,13 +381,13 @@ dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*error = __glXError(GLXBadProfileARB);
|
*error = __glXError(GLXBadProfileARB);
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB:
|
case GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB:
|
||||||
if (screen->dri2->base.version >= 4) {
|
if (screen->dri2->base.version >= 4) {
|
||||||
*error = BadValue;
|
*error = BadValue;
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (attribs[i * 2 + 1]) {
|
switch (attribs[i * 2 + 1]) {
|
||||||
|
@ -399,14 +399,14 @@ dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*error = BadValue;
|
*error = BadValue;
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* If an unknown attribute is received, fail.
|
/* If an unknown attribute is received, fail.
|
||||||
*/
|
*/
|
||||||
*error = BadValue;
|
*error = BadValue;
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
|
||||||
*/
|
*/
|
||||||
if ((*flags & ~ALL_DRI_CTX_FLAGS) != 0) {
|
if ((*flags & ~ALL_DRI_CTX_FLAGS) != 0) {
|
||||||
*error = BadValue;
|
*error = BadValue;
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the core profile is requested for a GL version is less than 3.2,
|
/* If the core profile is requested for a GL version is less than 3.2,
|
||||||
|
@ -428,7 +428,7 @@ dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs,
|
||||||
}
|
}
|
||||||
|
|
||||||
*error = Success;
|
*error = Success;
|
||||||
return True;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
16
glx/glxext.c
16
glx/glxext.c
|
@ -97,7 +97,7 @@ ContextGone(__GLXcontext * cx, XID id)
|
||||||
__glXFreeContext(cx);
|
__glXFreeContext(cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return True;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __GLXcontext *glxPendingDestroyContexts;
|
static __GLXcontext *glxPendingDestroyContexts;
|
||||||
|
@ -146,7 +146,7 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
|
||||||
|
|
||||||
glxPriv->destroy(glxPriv);
|
glxPriv->destroy(glxPriv);
|
||||||
|
|
||||||
return True;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
@ -155,12 +155,12 @@ __glXAddContext(__GLXcontext * cx)
|
||||||
/* Register this context as a resource.
|
/* Register this context as a resource.
|
||||||
*/
|
*/
|
||||||
if (!AddResource(cx->id, __glXContextRes, (void *)cx)) {
|
if (!AddResource(cx->id, __glXContextRes, (void *)cx)) {
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cx->next = glxAllContexts;
|
cx->next = glxAllContexts;
|
||||||
glxAllContexts = cx;
|
glxAllContexts = cx;
|
||||||
return True;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -321,11 +321,11 @@ checkScreenVisuals(void)
|
||||||
for (j = 0; j < screen->numVisuals; j++) {
|
for (j = 0; j < screen->numVisuals; j++) {
|
||||||
if (screen->visuals[j].class == TrueColor ||
|
if (screen->visuals[j].class == TrueColor ||
|
||||||
screen->visuals[j].class == DirectColor)
|
screen->visuals[j].class == DirectColor)
|
||||||
return True;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -355,7 +355,7 @@ GlxExtensionInit(void)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
int i;
|
int i;
|
||||||
__GLXprovider *p, **stack;
|
__GLXprovider *p, **stack;
|
||||||
Bool glx_provided = False;
|
Bool glx_provided = FALSE;
|
||||||
|
|
||||||
if (serverGeneration == 1) {
|
if (serverGeneration == 1) {
|
||||||
for (stack = &__glXProviderStack; *stack; stack = &(*stack)->next)
|
for (stack = &__glXProviderStack; *stack; stack = &(*stack)->next)
|
||||||
|
@ -402,7 +402,7 @@ GlxExtensionInit(void)
|
||||||
LogMessage(X_INFO,
|
LogMessage(X_INFO,
|
||||||
"GLX: no usable GL providers found for screen %d\n", i);
|
"GLX: no usable GL providers found for screen %d\n", i);
|
||||||
else
|
else
|
||||||
glx_provided = True;
|
glx_provided = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't register extension if GL is not provided on any screen */
|
/* don't register extension if GL is not provided on any screen */
|
||||||
|
|
|
@ -65,13 +65,6 @@ typedef struct __GLXcontext __GLXcontext;
|
||||||
#include "glxdrawable.h"
|
#include "glxdrawable.h"
|
||||||
#include "glxcontext.h"
|
#include "glxcontext.h"
|
||||||
|
|
||||||
#ifndef True
|
|
||||||
#define True 1
|
|
||||||
#endif
|
|
||||||
#ifndef False
|
|
||||||
#define False 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
|
extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
|
||||||
extern __GLXclientState *glxGetClient(ClientPtr pClient);
|
extern __GLXclientState *glxGetClient(ClientPtr pClient);
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc)
|
||||||
PFNGLGETPROGRAMSTRINGARBPROC get_program_string =
|
PFNGLGETPROGRAMSTRINGARBPROC get_program_string =
|
||||||
__glGetProcAddress("glGetProgramStringARB");
|
__glGetProcAddress("glGetProgramStringARB");
|
||||||
|
|
||||||
return DoGetProgramString(cl, pc, get_program, get_program_string, False);
|
return DoGetProgramString(cl, pc, get_program, get_program_string, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -123,5 +123,5 @@ __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc)
|
||||||
PFNGLGETPROGRAMSTRINGARBPROC get_program_string =
|
PFNGLGETPROGRAMSTRINGARBPROC get_program_string =
|
||||||
__glGetProcAddress("glGetProgramStringARB");
|
__glGetProcAddress("glGetProgramStringARB");
|
||||||
|
|
||||||
return DoGetProgramString(cl, pc, get_program, get_program_string, True);
|
return DoGetProgramString(cl, pc, get_program, get_program_string, TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1403,7 +1403,7 @@ glxWinContextMakeCurrent(__GLXcontext * base)
|
||||||
* feature so just error out if it can't work.
|
* feature so just error out if it can't work.
|
||||||
*/
|
*/
|
||||||
if (!scr->has_WGL_ARB_make_current_read)
|
if (!scr->has_WGL_ARB_make_current_read)
|
||||||
return False;
|
return FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If there is a separate read drawable, create a separate read DC, and
|
If there is a separate read drawable, create a separate read DC, and
|
||||||
|
|
Loading…
Reference in New Issue