Merge branch 'master' into randr-1.2
This commit is contained in:
commit
59511974db
|
@ -359,7 +359,12 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
||||||
if (pixmap->drawable.depth >= 24) {
|
if (pixmap->drawable.depth >= 24) {
|
||||||
bpp = 4;
|
bpp = 4;
|
||||||
format = GL_BGRA;
|
format = GL_BGRA;
|
||||||
type = GL_UNSIGNED_BYTE;
|
type =
|
||||||
|
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
|
||||||
|
GL_UNSIGNED_BYTE;
|
||||||
|
#else
|
||||||
|
GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
bpp = 2;
|
bpp = 2;
|
||||||
format = GL_RGB;
|
format = GL_RGB;
|
||||||
|
|
|
@ -2756,6 +2756,31 @@ int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||||
|
|
||||||
|
GLboolean retval;
|
||||||
|
GLboolean answerBuffer[200];
|
||||||
|
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
||||||
|
retval = CALL_AreTexturesResident( GET_DISPATCH(), (
|
||||||
|
n,
|
||||||
|
(const GLuint *)(pc + 4),
|
||||||
|
residences
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDisp_CopyTexImage1D(GLbyte * pc)
|
void __glXDisp_CopyTexImage1D(GLbyte * pc)
|
||||||
{
|
{
|
||||||
CALL_CopyTexImage1D( GET_DISPATCH(), (
|
CALL_CopyTexImage1D( GET_DISPATCH(), (
|
||||||
|
@ -2810,6 +2835,26 @@ void __glXDisp_CopyTexSubImage2D(GLbyte * pc)
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_SINGLE_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||||
|
|
||||||
|
CALL_DeleteTextures( GET_DISPATCH(), (
|
||||||
|
n,
|
||||||
|
(const GLuint *)(pc + 4)
|
||||||
|
) );
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
int error;
|
int error;
|
||||||
|
@ -2852,6 +2897,29 @@ int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||||
|
|
||||||
|
GLuint answerBuffer[200];
|
||||||
|
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
CALL_GenTextures( GET_DISPATCH(), (
|
||||||
|
n,
|
||||||
|
textures
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -2871,6 +2939,25 @@ int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
GLboolean retval;
|
||||||
|
retval = CALL_IsTexture( GET_DISPATCH(), (
|
||||||
|
*(GLuint *)(pc + 0)
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDisp_PrioritizeTextures(GLbyte * pc)
|
void __glXDisp_PrioritizeTextures(GLbyte * pc)
|
||||||
{
|
{
|
||||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
const GLsizei n = *(GLsizei *)(pc + 0);
|
||||||
|
@ -3039,6 +3126,35 @@ int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetColorTableParameterfv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3068,6 +3184,35 @@ int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetColorTableParameteriv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDisp_ColorSubTable(GLbyte * pc)
|
void __glXDisp_ColorSubTable(GLbyte * pc)
|
||||||
{
|
{
|
||||||
const GLvoid * const data = (const GLvoid *) (pc + 40);
|
const GLvoid * const data = (const GLvoid *) (pc + 40);
|
||||||
|
@ -3244,6 +3389,35 @@ int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3273,6 +3447,35 @@ int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3302,6 +3505,35 @@ int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetHistogramParameterfv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3331,6 +3563,35 @@ int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetHistogramParameteriv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3360,6 +3621,35 @@ int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3389,6 +3679,35 @@ int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = *(GLenum *)(pc + 4);
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
|
||||||
|
*(GLenum *)(pc + 0),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDisp_Histogram(GLbyte * pc)
|
void __glXDisp_Histogram(GLbyte * pc)
|
||||||
{
|
{
|
||||||
CALL_Histogram( GET_DISPATCH(), (
|
CALL_Histogram( GET_DISPATCH(), (
|
||||||
|
@ -4414,131 +4733,6 @@ void __glXDisp_DrawBuffersARB(GLbyte * pc)
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLenum pname = *(GLenum *)(pc + 4);
|
|
||||||
|
|
||||||
const GLuint compsize = __glGetColorTableParameterfvSGI_size(pname);
|
|
||||||
GLfloat answerBuffer[200];
|
|
||||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
|
||||||
|
|
||||||
if (params == NULL) return BadAlloc;
|
|
||||||
__glXClearErrorOccured();
|
|
||||||
|
|
||||||
CALL_GetColorTableParameterfvSGI( GET_DISPATCH(), (
|
|
||||||
*(GLenum *)(pc + 0),
|
|
||||||
pname,
|
|
||||||
params
|
|
||||||
) );
|
|
||||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLenum pname = *(GLenum *)(pc + 4);
|
|
||||||
|
|
||||||
const GLuint compsize = __glGetColorTableParameterivSGI_size(pname);
|
|
||||||
GLint answerBuffer[200];
|
|
||||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
|
||||||
|
|
||||||
if (params == NULL) return BadAlloc;
|
|
||||||
__glXClearErrorOccured();
|
|
||||||
|
|
||||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (
|
|
||||||
*(GLenum *)(pc + 0),
|
|
||||||
pname,
|
|
||||||
params
|
|
||||||
) );
|
|
||||||
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
|
||||||
|
|
||||||
GLboolean retval;
|
|
||||||
GLboolean answerBuffer[200];
|
|
||||||
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
|
||||||
retval = CALL_AreTexturesResidentEXT( GET_DISPATCH(), (
|
|
||||||
n,
|
|
||||||
(const GLuint *)(pc + 4),
|
|
||||||
residences
|
|
||||||
) );
|
|
||||||
__glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLsizei n = *(GLsizei *)(pc + 0);
|
|
||||||
|
|
||||||
GLuint answerBuffer[200];
|
|
||||||
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
|
||||||
CALL_GenTexturesEXT( GET_DISPATCH(), (
|
|
||||||
n,
|
|
||||||
textures
|
|
||||||
) );
|
|
||||||
__glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
GLboolean retval;
|
|
||||||
retval = CALL_IsTextureEXT( GET_DISPATCH(), (
|
|
||||||
*(GLuint *)(pc + 0)
|
|
||||||
) );
|
|
||||||
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
void __glXDisp_SampleMaskSGIS(GLbyte * pc)
|
void __glXDisp_SampleMaskSGIS(GLbyte * pc)
|
||||||
{
|
{
|
||||||
CALL_SampleMaskSGIS( GET_DISPATCH(), (
|
CALL_SampleMaskSGIS( GET_DISPATCH(), (
|
||||||
|
|
|
@ -61,8 +61,6 @@ extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc);
|
extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_Histogram(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Histogram(GLbyte * pc);
|
||||||
|
@ -163,6 +161,8 @@ extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -251,6 +251,8 @@ extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc);
|
extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc);
|
||||||
|
@ -319,6 +321,8 @@ extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyt
|
||||||
extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc);
|
||||||
|
@ -409,6 +413,8 @@ extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
|
extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -469,6 +475,8 @@ extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -477,6 +485,8 @@ extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_Frustum(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Frustum(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -493,6 +503,8 @@ extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc);
|
||||||
|
@ -587,6 +599,8 @@ extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -617,6 +631,8 @@ extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, G
|
||||||
extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc);
|
extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -635,8 +651,6 @@ extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_Lightf(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Lightf(GLbyte * pc);
|
||||||
|
@ -685,6 +699,8 @@ extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte
|
||||||
extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -725,6 +741,8 @@ extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec
|
||||||
extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc);
|
extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc);
|
extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc);
|
||||||
|
@ -755,6 +773,8 @@ extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_CallList(GLbyte * pc);
|
extern HIDDEN void __glXDisp_CallList(GLbyte * pc);
|
||||||
|
@ -773,8 +793,6 @@ extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc);
|
||||||
|
@ -797,10 +815,10 @@ extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc);
|
extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -827,8 +845,12 @@ extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStat
|
||||||
extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
|
extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
|
||||||
|
@ -841,8 +863,6 @@ extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc);
|
extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
@ -861,6 +881,8 @@ extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_Materialf(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Materialf(GLbyte * pc);
|
||||||
|
@ -921,8 +943,6 @@ extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc);
|
||||||
|
@ -1005,6 +1025,8 @@ extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc);
|
extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc);
|
extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc);
|
||||||
|
|
|
@ -2887,6 +2887,31 @@ int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||||
|
|
||||||
|
GLboolean retval;
|
||||||
|
GLboolean answerBuffer[200];
|
||||||
|
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
||||||
|
retval = CALL_AreTexturesResident( GET_DISPATCH(), (
|
||||||
|
n,
|
||||||
|
(const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
|
||||||
|
residences
|
||||||
|
) );
|
||||||
|
__glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDispSwap_CopyTexImage1D(GLbyte * pc)
|
void __glXDispSwap_CopyTexImage1D(GLbyte * pc)
|
||||||
{
|
{
|
||||||
CALL_CopyTexImage1D( GET_DISPATCH(), (
|
CALL_CopyTexImage1D( GET_DISPATCH(), (
|
||||||
|
@ -2941,6 +2966,26 @@ void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_SINGLE_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||||
|
|
||||||
|
CALL_DeleteTextures( GET_DISPATCH(), (
|
||||||
|
n,
|
||||||
|
(const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
|
||||||
|
) );
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
int error;
|
int error;
|
||||||
|
@ -2984,6 +3029,30 @@ int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||||
|
|
||||||
|
GLuint answerBuffer[200];
|
||||||
|
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
CALL_GenTextures( GET_DISPATCH(), (
|
||||||
|
n,
|
||||||
|
textures
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) textures, n );
|
||||||
|
__glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3003,6 +3072,25 @@ int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
GLboolean retval;
|
||||||
|
retval = CALL_IsTexture( GET_DISPATCH(), (
|
||||||
|
(GLuint )bswap_CARD32 ( pc + 0 )
|
||||||
|
) );
|
||||||
|
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDispSwap_PrioritizeTextures(GLbyte * pc)
|
void __glXDispSwap_PrioritizeTextures(GLbyte * pc)
|
||||||
{
|
{
|
||||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
||||||
|
@ -3172,6 +3260,36 @@ int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetColorTableParameterfv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3202,6 +3320,36 @@ int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetColorTableParameteriv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDispSwap_ColorSubTable(GLbyte * pc)
|
void __glXDispSwap_ColorSubTable(GLbyte * pc)
|
||||||
{
|
{
|
||||||
const GLvoid * const data = (const GLvoid *) (pc + 40);
|
const GLvoid * const data = (const GLvoid *) (pc + 40);
|
||||||
|
@ -3379,6 +3527,36 @@ int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3409,6 +3587,36 @@ int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3439,6 +3647,36 @@ int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetHistogramParameterfv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3469,6 +3707,36 @@ int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetHistogramParameteriv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3499,6 +3767,36 @@ int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
|
||||||
|
GLfloat answerBuffer[200];
|
||||||
|
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
|
||||||
|
@ -3529,6 +3827,36 @@ int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
||||||
|
int error;
|
||||||
|
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
||||||
|
|
||||||
|
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||||
|
if ( cx != NULL ) {
|
||||||
|
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
||||||
|
|
||||||
|
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
|
||||||
|
GLint answerBuffer[200];
|
||||||
|
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
||||||
|
|
||||||
|
if (params == NULL) return BadAlloc;
|
||||||
|
__glXClearErrorOccured();
|
||||||
|
|
||||||
|
CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
|
||||||
|
(GLenum )bswap_ENUM ( pc + 0 ),
|
||||||
|
pname,
|
||||||
|
params
|
||||||
|
) );
|
||||||
|
(void) bswap_32_array( (uint32_t *) params, compsize );
|
||||||
|
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
||||||
|
error = Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
void __glXDispSwap_Histogram(GLbyte * pc)
|
void __glXDispSwap_Histogram(GLbyte * pc)
|
||||||
{
|
{
|
||||||
CALL_Histogram( GET_DISPATCH(), (
|
CALL_Histogram( GET_DISPATCH(), (
|
||||||
|
@ -4566,134 +4894,6 @@ void __glXDispSwap_DrawBuffersARB(GLbyte * pc)
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
|
||||||
|
|
||||||
const GLuint compsize = __glGetColorTableParameterfvSGI_size(pname);
|
|
||||||
GLfloat answerBuffer[200];
|
|
||||||
GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
|
||||||
|
|
||||||
if (params == NULL) return BadAlloc;
|
|
||||||
__glXClearErrorOccured();
|
|
||||||
|
|
||||||
CALL_GetColorTableParameterfvSGI( GET_DISPATCH(), (
|
|
||||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
|
||||||
pname,
|
|
||||||
params
|
|
||||||
) );
|
|
||||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
|
||||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
|
|
||||||
|
|
||||||
const GLuint compsize = __glGetColorTableParameterivSGI_size(pname);
|
|
||||||
GLint answerBuffer[200];
|
|
||||||
GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
|
|
||||||
|
|
||||||
if (params == NULL) return BadAlloc;
|
|
||||||
__glXClearErrorOccured();
|
|
||||||
|
|
||||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (
|
|
||||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
|
||||||
pname,
|
|
||||||
params
|
|
||||||
) );
|
|
||||||
(void) bswap_32_array( (uint32_t *) params, compsize );
|
|
||||||
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
|
||||||
|
|
||||||
GLboolean retval;
|
|
||||||
GLboolean answerBuffer[200];
|
|
||||||
GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
|
|
||||||
retval = CALL_AreTexturesResidentEXT( GET_DISPATCH(), (
|
|
||||||
n,
|
|
||||||
(const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
|
|
||||||
residences
|
|
||||||
) );
|
|
||||||
__glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
|
|
||||||
|
|
||||||
GLuint answerBuffer[200];
|
|
||||||
GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
|
|
||||||
CALL_GenTexturesEXT( GET_DISPATCH(), (
|
|
||||||
n,
|
|
||||||
textures
|
|
||||||
) );
|
|
||||||
(void) bswap_32_array( (uint32_t *) textures, n );
|
|
||||||
__glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
|
|
||||||
{
|
|
||||||
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
|
|
||||||
int error;
|
|
||||||
__GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
if ( cx != NULL ) {
|
|
||||||
GLboolean retval;
|
|
||||||
retval = CALL_IsTextureEXT( GET_DISPATCH(), (
|
|
||||||
(GLuint )bswap_CARD32 ( pc + 0 )
|
|
||||||
) );
|
|
||||||
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
|
|
||||||
error = Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
void __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
|
void __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
|
||||||
{
|
{
|
||||||
CALL_SampleMaskSGIS( GET_DISPATCH(), (
|
CALL_SampleMaskSGIS( GET_DISPATCH(), (
|
||||||
|
|
|
@ -84,7 +84,8 @@ __glCallLists_size( GLenum e )
|
||||||
case GL_FLOAT:
|
case GL_FLOAT:
|
||||||
case GL_4_BYTES:
|
case GL_4_BYTES:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +103,8 @@ __glFogfv_size( GLenum e )
|
||||||
return 1;
|
return 1;
|
||||||
case GL_FOG_COLOR:
|
case GL_FOG_COLOR:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +125,8 @@ __glLightfv_size( GLenum e )
|
||||||
case GL_SPECULAR:
|
case GL_SPECULAR:
|
||||||
case GL_POSITION:
|
case GL_POSITION:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +141,8 @@ __glLightModelfv_size( GLenum e )
|
||||||
return 1;
|
return 1;
|
||||||
case GL_LIGHT_MODEL_AMBIENT:
|
case GL_LIGHT_MODEL_AMBIENT:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +160,8 @@ __glMaterialfv_size( GLenum e )
|
||||||
case GL_EMISSION:
|
case GL_EMISSION:
|
||||||
case GL_AMBIENT_AND_DIFFUSE:
|
case GL_AMBIENT_AND_DIFFUSE:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +212,8 @@ __glTexParameterfv_size( GLenum e )
|
||||||
case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
|
case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
|
||||||
case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
|
case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +248,8 @@ __glTexEnvfv_size( GLenum e )
|
||||||
return 1;
|
return 1;
|
||||||
case GL_TEXTURE_ENV_COLOR:
|
case GL_TEXTURE_ENV_COLOR:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,7 +262,8 @@ __glTexGendv_size( GLenum e )
|
||||||
case GL_OBJECT_PLANE:
|
case GL_OBJECT_PLANE:
|
||||||
case GL_EYE_PLANE:
|
case GL_EYE_PLANE:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +284,8 @@ __glMap1d_size( GLenum e )
|
||||||
case GL_MAP1_TEXTURE_COORD_4:
|
case GL_MAP1_TEXTURE_COORD_4:
|
||||||
case GL_MAP1_VERTEX_4:
|
case GL_MAP1_VERTEX_4:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,7 +306,8 @@ __glMap2d_size( GLenum e )
|
||||||
case GL_MAP2_TEXTURE_COORD_4:
|
case GL_MAP2_TEXTURE_COORD_4:
|
||||||
case GL_MAP2_VERTEX_4:
|
case GL_MAP2_VERTEX_4:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -766,7 +776,8 @@ __glGetBooleanv_size( GLenum e )
|
||||||
case GL_FOG_COORDINATE_SOURCE:
|
case GL_FOG_COORDINATE_SOURCE:
|
||||||
case GL_COMPRESSED_TEXTURE_FORMATS:
|
case GL_COMPRESSED_TEXTURE_FORMATS:
|
||||||
return __glGetBooleanv_variable_size(e);
|
return __glGetBooleanv_variable_size(e);
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -818,7 +829,8 @@ __glGetTexParameterfv_size( GLenum e )
|
||||||
case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
|
case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
|
||||||
case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
|
case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -851,7 +863,8 @@ __glGetTexLevelParameterfv_size( GLenum e )
|
||||||
case GL_TEXTURE_DEPTH_SIZE:
|
case GL_TEXTURE_DEPTH_SIZE:
|
||||||
/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/
|
/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,7 +875,8 @@ __glColorTableParameterfv_size( GLenum e )
|
||||||
case GL_COLOR_TABLE_SCALE:
|
case GL_COLOR_TABLE_SCALE:
|
||||||
case GL_COLOR_TABLE_BIAS:
|
case GL_COLOR_TABLE_BIAS:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +904,8 @@ __glGetColorTableParameterfv_size( GLenum e )
|
||||||
case GL_COLOR_TABLE_SCALE:
|
case GL_COLOR_TABLE_SCALE:
|
||||||
case GL_COLOR_TABLE_BIAS:
|
case GL_COLOR_TABLE_BIAS:
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -908,7 +923,8 @@ __glConvolutionParameterfv_size( GLenum e )
|
||||||
case GL_CONVOLUTION_BORDER_COLOR:
|
case GL_CONVOLUTION_BORDER_COLOR:
|
||||||
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
|
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -936,7 +952,8 @@ __glGetConvolutionParameterfv_size( GLenum e )
|
||||||
case GL_CONVOLUTION_BORDER_COLOR:
|
case GL_CONVOLUTION_BORDER_COLOR:
|
||||||
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
|
/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
|
||||||
return 4;
|
return 4;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -953,7 +970,8 @@ __glGetHistogramParameterfv_size( GLenum e )
|
||||||
case GL_HISTOGRAM_LUMINANCE_SIZE:
|
case GL_HISTOGRAM_LUMINANCE_SIZE:
|
||||||
case GL_HISTOGRAM_SINK:
|
case GL_HISTOGRAM_SINK:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -964,7 +982,8 @@ __glGetMinmaxParameterfv_size( GLenum e )
|
||||||
case GL_MINMAX_FORMAT:
|
case GL_MINMAX_FORMAT:
|
||||||
case GL_MINMAX_SINK:
|
case GL_MINMAX_SINK:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1018,7 +1037,8 @@ __glGetProgramivARB_size( GLenum e )
|
||||||
case GL_MAX_PROGRAM_LOOP_DEPTH_NV:
|
case GL_MAX_PROGRAM_LOOP_DEPTH_NV:
|
||||||
case GL_MAX_PROGRAM_LOOP_COUNT_NV:
|
case GL_MAX_PROGRAM_LOOP_COUNT_NV:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1033,7 +1053,8 @@ __glGetVertexAttribdvARB_size( GLenum e )
|
||||||
case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
|
case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
|
||||||
case GL_CURRENT_VERTEX_ATTRIB_ARB:
|
case GL_CURRENT_VERTEX_ATTRIB_ARB:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1044,7 +1065,8 @@ __glGetQueryObjectivARB_size( GLenum e )
|
||||||
case GL_QUERY_RESULT_ARB:
|
case GL_QUERY_RESULT_ARB:
|
||||||
case GL_QUERY_RESULT_AVAILABLE_ARB:
|
case GL_QUERY_RESULT_AVAILABLE_ARB:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1055,7 +1077,8 @@ __glGetQueryivARB_size( GLenum e )
|
||||||
case GL_QUERY_COUNTER_BITS_ARB:
|
case GL_QUERY_COUNTER_BITS_ARB:
|
||||||
case GL_CURRENT_QUERY_ARB:
|
case GL_CURRENT_QUERY_ARB:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1079,7 +1102,8 @@ __glPointParameterfvEXT_size( GLenum e )
|
||||||
/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
|
/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
|
||||||
/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
|
/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
|
||||||
return 3;
|
return 3;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1091,7 +1115,8 @@ __glGetProgramivNV_size( GLenum e )
|
||||||
case GL_PROGRAM_TARGET_NV:
|
case GL_PROGRAM_TARGET_NV:
|
||||||
case GL_PROGRAM_RESIDENT_NV:
|
case GL_PROGRAM_RESIDENT_NV:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1104,7 +1129,8 @@ __glGetVertexAttribdvNV_size( GLenum e )
|
||||||
case GL_ATTRIB_ARRAY_TYPE_NV:
|
case GL_ATTRIB_ARRAY_TYPE_NV:
|
||||||
case GL_CURRENT_ATTRIB_NV:
|
case GL_CURRENT_ATTRIB_NV:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1118,7 +1144,8 @@ __glGetFramebufferAttachmentParameterivEXT_size( GLenum e )
|
||||||
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
|
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
|
||||||
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
|
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
|
||||||
return 1;
|
return 1;
|
||||||
default: return 0;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1155,12 +1182,9 @@ ALIAS( GetMinmaxParameteriv, GetMinmaxParameterfv )
|
||||||
ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB)
|
ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB)
|
||||||
ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB)
|
ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB)
|
||||||
ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB)
|
ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB)
|
||||||
ALIAS( GetColorTableParameterfvSGI, GetColorTableParameterfv )
|
|
||||||
ALIAS( GetColorTableParameterivSGI, GetColorTableParameterfv )
|
|
||||||
ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV)
|
ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV)
|
||||||
ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV)
|
ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV)
|
||||||
ALIAS(PointParameterivNV, PointParameterfvEXT)
|
ALIAS(PointParameterivNV, PointParameterfvEXT)
|
||||||
|
|
||||||
# undef PURE
|
# undef PURE
|
||||||
# undef FASTCALL
|
# undef FASTCALL
|
||||||
# undef INTERNAL
|
# undef INTERNAL
|
||||||
|
|
|
@ -73,8 +73,10 @@ extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameteriv_size(GLenum);
|
__glGetConvolutionParameterfv_size(GLenum);
|
||||||
|
extern INTERNAL PURE FASTCALL GLint
|
||||||
|
__glGetConvolutionParameteriv_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
|
||||||
|
@ -86,13 +88,12 @@ extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfvSGI_size(GLenum);
|
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterivSGI_size(GLenum);
|
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
|
||||||
extern INTERNAL PURE FASTCALL GLint __glGetFramebufferAttachmentParameterivEXT_size(GLenum);
|
extern INTERNAL PURE FASTCALL GLint
|
||||||
|
__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
|
||||||
|
|
||||||
# undef PURE
|
# undef PURE
|
||||||
# undef FASTCALL
|
# undef FASTCALL
|
||||||
|
|
|
@ -163,7 +163,7 @@ static const void *Single_function_table[112][2] = {
|
||||||
/* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList},
|
/* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList},
|
||||||
/* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush},
|
/* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush},
|
||||||
/* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident},
|
/* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident},
|
||||||
/* [ 88] = 144 */ {NULL, NULL},
|
/* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures},
|
||||||
/* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures},
|
/* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures},
|
||||||
/* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture},
|
/* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture},
|
||||||
/* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable},
|
/* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable},
|
||||||
|
@ -1232,12 +1232,12 @@ const struct __glXDispatchInfo Render_dispatch_info = {
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
/* tree depth = 13 */
|
/* tree depth = 13 */
|
||||||
static const int_fast16_t VendorPriv_dispatch_tree[158] = {
|
static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
||||||
/* [0] -> opcode range [0, 131072], node depth 1 */
|
/* [0] -> opcode range [0, 131072], node depth 1 */
|
||||||
2,
|
2,
|
||||||
5,
|
5,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
122,
|
119,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [5] -> opcode range [0, 32768], node depth 2 */
|
/* [5] -> opcode range [0, 32768], node depth 2 */
|
||||||
|
@ -1254,14 +1254,14 @@ static const int_fast16_t VendorPriv_dispatch_tree[158] = {
|
||||||
2,
|
2,
|
||||||
16,
|
16,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
81,
|
78,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [16] -> opcode range [0, 2048], node depth 5 */
|
/* [16] -> opcode range [0, 2048], node depth 5 */
|
||||||
2,
|
2,
|
||||||
21,
|
21,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
39,
|
36,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [21] -> opcode range [0, 512], node depth 6 */
|
/* [21] -> opcode range [0, 512], node depth 6 */
|
||||||
|
@ -1286,298 +1286,301 @@ static const int_fast16_t VendorPriv_dispatch_tree[158] = {
|
||||||
|
|
||||||
/* [33] -> opcode range [0, 32], node depth 10 */
|
/* [33] -> opcode range [0, 32], node depth 10 */
|
||||||
1,
|
1,
|
||||||
36,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [36] -> opcode range [0, 16], node depth 11 */
|
|
||||||
1,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
LEAF(0),
|
LEAF(0),
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [39] -> opcode range [1024, 1536], node depth 6 */
|
/* [36] -> opcode range [1024, 1536], node depth 6 */
|
||||||
2,
|
2,
|
||||||
|
41,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
53,
|
||||||
|
67,
|
||||||
|
|
||||||
|
/* [41] -> opcode range [1024, 1152], node depth 7 */
|
||||||
|
1,
|
||||||
44,
|
44,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
56,
|
|
||||||
70,
|
|
||||||
|
|
||||||
/* [44] -> opcode range [1024, 1152], node depth 7 */
|
/* [44] -> opcode range [1024, 1088], node depth 8 */
|
||||||
1,
|
1,
|
||||||
47,
|
47,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [47] -> opcode range [1024, 1088], node depth 8 */
|
/* [47] -> opcode range [1024, 1056], node depth 9 */
|
||||||
1,
|
1,
|
||||||
50,
|
50,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [50] -> opcode range [1024, 1056], node depth 9 */
|
/* [50] -> opcode range [1024, 1040], node depth 10 */
|
||||||
1,
|
1,
|
||||||
53,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [53] -> opcode range [1024, 1040], node depth 10 */
|
|
||||||
1,
|
|
||||||
LEAF(8),
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [56] -> opcode range [1280, 1408], node depth 7 */
|
|
||||||
1,
|
|
||||||
59,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [59] -> opcode range [1280, 1344], node depth 8 */
|
|
||||||
2,
|
|
||||||
64,
|
|
||||||
LEAF(16),
|
LEAF(16),
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
67,
|
|
||||||
|
|
||||||
/* [64] -> opcode range [1280, 1296], node depth 9 */
|
/* [53] -> opcode range [1280, 1408], node depth 7 */
|
||||||
|
1,
|
||||||
|
56,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [56] -> opcode range [1280, 1344], node depth 8 */
|
||||||
|
2,
|
||||||
|
61,
|
||||||
|
LEAF(24),
|
||||||
|
EMPTY_LEAF,
|
||||||
|
64,
|
||||||
|
|
||||||
|
/* [61] -> opcode range [1280, 1296], node depth 9 */
|
||||||
1,
|
1,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
LEAF(32),
|
|
||||||
|
|
||||||
/* [67] -> opcode range [1328, 1344], node depth 9 */
|
|
||||||
1,
|
|
||||||
LEAF(40),
|
LEAF(40),
|
||||||
|
|
||||||
|
/* [64] -> opcode range [1328, 1344], node depth 9 */
|
||||||
|
1,
|
||||||
|
LEAF(48),
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [70] -> opcode range [1408, 1536], node depth 7 */
|
/* [67] -> opcode range [1408, 1536], node depth 7 */
|
||||||
|
1,
|
||||||
|
70,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [70] -> opcode range [1408, 1472], node depth 8 */
|
||||||
1,
|
1,
|
||||||
73,
|
73,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [73] -> opcode range [1408, 1472], node depth 8 */
|
/* [73] -> opcode range [1408, 1440], node depth 9 */
|
||||||
1,
|
|
||||||
76,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [76] -> opcode range [1408, 1440], node depth 9 */
|
|
||||||
2,
|
2,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
LEAF(48),
|
|
||||||
LEAF(56),
|
LEAF(56),
|
||||||
|
LEAF(64),
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [81] -> opcode range [4096, 6144], node depth 5 */
|
/* [78] -> opcode range [4096, 6144], node depth 5 */
|
||||||
2,
|
2,
|
||||||
|
83,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
101,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [83] -> opcode range [4096, 4608], node depth 6 */
|
||||||
|
1,
|
||||||
86,
|
86,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
104,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [86] -> opcode range [4096, 4608], node depth 6 */
|
/* [86] -> opcode range [4096, 4352], node depth 7 */
|
||||||
1,
|
1,
|
||||||
89,
|
89,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [89] -> opcode range [4096, 4352], node depth 7 */
|
/* [89] -> opcode range [4096, 4224], node depth 8 */
|
||||||
1,
|
1,
|
||||||
92,
|
92,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [92] -> opcode range [4096, 4224], node depth 8 */
|
/* [92] -> opcode range [4096, 4160], node depth 9 */
|
||||||
1,
|
1,
|
||||||
95,
|
95,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [95] -> opcode range [4096, 4160], node depth 9 */
|
/* [95] -> opcode range [4096, 4128], node depth 10 */
|
||||||
1,
|
1,
|
||||||
98,
|
98,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [98] -> opcode range [4096, 4128], node depth 10 */
|
/* [98] -> opcode range [4096, 4112], node depth 11 */
|
||||||
1,
|
|
||||||
101,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [101] -> opcode range [4096, 4112], node depth 11 */
|
|
||||||
1,
|
|
||||||
LEAF(64),
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [104] -> opcode range [5120, 5632], node depth 6 */
|
|
||||||
1,
|
|
||||||
107,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [107] -> opcode range [5120, 5376], node depth 7 */
|
|
||||||
1,
|
|
||||||
110,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [110] -> opcode range [5120, 5248], node depth 8 */
|
|
||||||
1,
|
|
||||||
113,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [113] -> opcode range [5120, 5184], node depth 9 */
|
|
||||||
1,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
116,
|
|
||||||
|
|
||||||
/* [116] -> opcode range [5152, 5184], node depth 10 */
|
|
||||||
1,
|
|
||||||
119,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [119] -> opcode range [5152, 5168], node depth 11 */
|
|
||||||
1,
|
1,
|
||||||
LEAF(72),
|
LEAF(72),
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [122] -> opcode range [65536, 98304], node depth 2 */
|
/* [101] -> opcode range [5120, 5632], node depth 6 */
|
||||||
1,
|
1,
|
||||||
125,
|
104,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [125] -> opcode range [65536, 81920], node depth 3 */
|
/* [104] -> opcode range [5120, 5376], node depth 7 */
|
||||||
1,
|
1,
|
||||||
128,
|
107,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [128] -> opcode range [65536, 73728], node depth 4 */
|
/* [107] -> opcode range [5120, 5248], node depth 8 */
|
||||||
1,
|
1,
|
||||||
131,
|
110,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [131] -> opcode range [65536, 69632], node depth 5 */
|
/* [110] -> opcode range [5120, 5184], node depth 9 */
|
||||||
1,
|
1,
|
||||||
134,
|
EMPTY_LEAF,
|
||||||
|
113,
|
||||||
|
|
||||||
|
/* [113] -> opcode range [5152, 5184], node depth 10 */
|
||||||
|
1,
|
||||||
|
116,
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
/* [134] -> opcode range [65536, 67584], node depth 6 */
|
/* [116] -> opcode range [5152, 5168], node depth 11 */
|
||||||
1,
|
|
||||||
137,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [137] -> opcode range [65536, 66560], node depth 7 */
|
|
||||||
1,
|
|
||||||
140,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [140] -> opcode range [65536, 66048], node depth 8 */
|
|
||||||
1,
|
|
||||||
143,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [143] -> opcode range [65536, 65792], node depth 9 */
|
|
||||||
1,
|
|
||||||
146,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [146] -> opcode range [65536, 65664], node depth 10 */
|
|
||||||
1,
|
|
||||||
149,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [149] -> opcode range [65536, 65600], node depth 11 */
|
|
||||||
1,
|
|
||||||
152,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [152] -> opcode range [65536, 65568], node depth 12 */
|
|
||||||
1,
|
|
||||||
155,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [155] -> opcode range [65536, 65552], node depth 13 */
|
|
||||||
1,
|
1,
|
||||||
LEAF(80),
|
LEAF(80),
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [119] -> opcode range [65536, 98304], node depth 2 */
|
||||||
|
1,
|
||||||
|
122,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [122] -> opcode range [65536, 81920], node depth 3 */
|
||||||
|
1,
|
||||||
|
125,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [125] -> opcode range [65536, 73728], node depth 4 */
|
||||||
|
1,
|
||||||
|
128,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [128] -> opcode range [65536, 69632], node depth 5 */
|
||||||
|
1,
|
||||||
|
131,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [131] -> opcode range [65536, 67584], node depth 6 */
|
||||||
|
1,
|
||||||
|
134,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [134] -> opcode range [65536, 66560], node depth 7 */
|
||||||
|
1,
|
||||||
|
137,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [137] -> opcode range [65536, 66048], node depth 8 */
|
||||||
|
1,
|
||||||
|
140,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [140] -> opcode range [65536, 65792], node depth 9 */
|
||||||
|
1,
|
||||||
|
143,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [143] -> opcode range [65536, 65664], node depth 10 */
|
||||||
|
1,
|
||||||
|
146,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [146] -> opcode range [65536, 65600], node depth 11 */
|
||||||
|
1,
|
||||||
|
149,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [149] -> opcode range [65536, 65568], node depth 12 */
|
||||||
|
1,
|
||||||
|
152,
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
|
/* [152] -> opcode range [65536, 65552], node depth 13 */
|
||||||
|
1,
|
||||||
|
LEAF(88),
|
||||||
|
EMPTY_LEAF,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const void *VendorPriv_function_table[88][2] = {
|
static const void *VendorPriv_function_table[96][2] = {
|
||||||
/* [ 0] = 8 */ {NULL, NULL},
|
/* [ 0] = 0 */ {NULL, NULL},
|
||||||
/* [ 1] = 9 */ {NULL, NULL},
|
/* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT},
|
||||||
/* [ 2] = 10 */ {NULL, NULL},
|
/* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT},
|
||||||
/* [ 3] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT},
|
/* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT},
|
||||||
/* [ 4] = 12 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures},
|
/* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT},
|
||||||
/* [ 5] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT},
|
/* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT},
|
||||||
/* [ 6] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT},
|
/* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT},
|
||||||
/* [ 7] = 15 */ {NULL, NULL},
|
/* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT},
|
||||||
/* [ 8] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT},
|
/* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT},
|
||||||
/* [ 9] = 1025 */ {NULL, NULL},
|
/* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT},
|
||||||
/* [ 10] = 1026 */ {NULL, NULL},
|
/* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT},
|
||||||
/* [ 11] = 1027 */ {NULL, NULL},
|
/* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT},
|
||||||
/* [ 12] = 1028 */ {NULL, NULL},
|
/* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT},
|
||||||
/* [ 13] = 1029 */ {NULL, NULL},
|
/* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT},
|
||||||
/* [ 14] = 1030 */ {NULL, NULL},
|
/* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT},
|
||||||
/* [ 15] = 1031 */ {NULL, NULL},
|
/* [ 15] = 15 */ {NULL, NULL},
|
||||||
/* [ 16] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB},
|
/* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT},
|
||||||
/* [ 17] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB},
|
/* [ 17] = 1025 */ {NULL, NULL},
|
||||||
/* [ 18] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV},
|
/* [ 18] = 1026 */ {NULL, NULL},
|
||||||
/* [ 19] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV},
|
/* [ 19] = 1027 */ {NULL, NULL},
|
||||||
/* [ 20] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV},
|
/* [ 20] = 1028 */ {NULL, NULL},
|
||||||
/* [ 21] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB},
|
/* [ 21] = 1029 */ {NULL, NULL},
|
||||||
/* [ 22] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV},
|
/* [ 22] = 1030 */ {NULL, NULL},
|
||||||
/* [ 23] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV},
|
/* [ 23] = 1031 */ {NULL, NULL},
|
||||||
/* [ 24] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV},
|
/* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB},
|
||||||
/* [ 25] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB},
|
/* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB},
|
||||||
/* [ 26] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB},
|
/* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV},
|
||||||
/* [ 27] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB},
|
/* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV},
|
||||||
/* [ 28] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB},
|
/* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV},
|
||||||
/* [ 29] = 1309 */ {NULL, NULL},
|
/* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB},
|
||||||
/* [ 30] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV},
|
/* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV},
|
||||||
/* [ 31] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV},
|
/* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV},
|
||||||
/* [ 32] = 1288 */ {NULL, NULL},
|
/* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV},
|
||||||
/* [ 33] = 1289 */ {NULL, NULL},
|
/* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB},
|
||||||
/* [ 34] = 1290 */ {NULL, NULL},
|
/* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB},
|
||||||
/* [ 35] = 1291 */ {NULL, NULL},
|
/* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB},
|
||||||
/* [ 36] = 1292 */ {NULL, NULL},
|
/* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB},
|
||||||
/* [ 37] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV},
|
/* [ 37] = 1309 */ {NULL, NULL},
|
||||||
/* [ 38] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV},
|
/* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV},
|
||||||
/* [ 39] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV},
|
/* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV},
|
||||||
/* [ 40] = 1328 */ {NULL, NULL},
|
/* [ 40] = 1288 */ {NULL, NULL},
|
||||||
/* [ 41] = 1329 */ {NULL, NULL},
|
/* [ 41] = 1289 */ {NULL, NULL},
|
||||||
/* [ 42] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT},
|
/* [ 42] = 1290 */ {NULL, NULL},
|
||||||
/* [ 43] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT},
|
/* [ 43] = 1291 */ {NULL, NULL},
|
||||||
/* [ 44] = 1332 */ {NULL, NULL},
|
/* [ 44] = 1292 */ {NULL, NULL},
|
||||||
/* [ 45] = 1333 */ {NULL, NULL},
|
/* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV},
|
||||||
/* [ 46] = 1334 */ {NULL, NULL},
|
/* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV},
|
||||||
/* [ 47] = 1335 */ {NULL, NULL},
|
/* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV},
|
||||||
/* [ 48] = 1416 */ {NULL, NULL},
|
/* [ 48] = 1328 */ {NULL, NULL},
|
||||||
/* [ 49] = 1417 */ {NULL, NULL},
|
/* [ 49] = 1329 */ {NULL, NULL},
|
||||||
/* [ 50] = 1418 */ {NULL, NULL},
|
/* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT},
|
||||||
/* [ 51] = 1419 */ {NULL, NULL},
|
/* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT},
|
||||||
/* [ 52] = 1420 */ {NULL, NULL},
|
/* [ 52] = 1332 */ {NULL, NULL},
|
||||||
/* [ 53] = 1421 */ {NULL, NULL},
|
/* [ 53] = 1333 */ {NULL, NULL},
|
||||||
/* [ 54] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT},
|
/* [ 54] = 1334 */ {NULL, NULL},
|
||||||
/* [ 55] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT},
|
/* [ 55] = 1335 */ {NULL, NULL},
|
||||||
/* [ 56] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT},
|
/* [ 56] = 1416 */ {NULL, NULL},
|
||||||
/* [ 57] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT},
|
/* [ 57] = 1417 */ {NULL, NULL},
|
||||||
/* [ 58] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT},
|
/* [ 58] = 1418 */ {NULL, NULL},
|
||||||
/* [ 59] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT},
|
/* [ 59] = 1419 */ {NULL, NULL},
|
||||||
/* [ 60] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT},
|
/* [ 60] = 1420 */ {NULL, NULL},
|
||||||
/* [ 61] = 1429 */ {NULL, NULL},
|
/* [ 61] = 1421 */ {NULL, NULL},
|
||||||
/* [ 62] = 1430 */ {NULL, NULL},
|
/* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT},
|
||||||
/* [ 63] = 1431 */ {NULL, NULL},
|
/* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT},
|
||||||
/* [ 64] = 4096 */ {NULL, NULL},
|
/* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT},
|
||||||
/* [ 65] = 4097 */ {NULL, NULL},
|
/* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT},
|
||||||
/* [ 66] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI},
|
/* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT},
|
||||||
/* [ 67] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI},
|
/* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT},
|
||||||
/* [ 68] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI},
|
/* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT},
|
||||||
/* [ 69] = 4101 */ {NULL, NULL},
|
/* [ 69] = 1429 */ {NULL, NULL},
|
||||||
/* [ 70] = 4102 */ {NULL, NULL},
|
/* [ 70] = 1430 */ {NULL, NULL},
|
||||||
/* [ 71] = 4103 */ {NULL, NULL},
|
/* [ 71] = 1431 */ {NULL, NULL},
|
||||||
/* [ 72] = 5152 */ {NULL, NULL},
|
/* [ 72] = 4096 */ {NULL, NULL},
|
||||||
/* [ 73] = 5153 */ {NULL, NULL},
|
/* [ 73] = 4097 */ {NULL, NULL},
|
||||||
/* [ 74] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA},
|
/* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI},
|
||||||
/* [ 75] = 5155 */ {NULL, NULL},
|
/* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI},
|
||||||
/* [ 76] = 5156 */ {NULL, NULL},
|
/* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI},
|
||||||
/* [ 77] = 5157 */ {NULL, NULL},
|
/* [ 77] = 4101 */ {NULL, NULL},
|
||||||
/* [ 78] = 5158 */ {NULL, NULL},
|
/* [ 78] = 4102 */ {NULL, NULL},
|
||||||
/* [ 79] = 5159 */ {NULL, NULL},
|
/* [ 79] = 4103 */ {NULL, NULL},
|
||||||
/* [ 80] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI},
|
/* [ 80] = 5152 */ {NULL, NULL},
|
||||||
/* [ 81] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI},
|
/* [ 81] = 5153 */ {NULL, NULL},
|
||||||
/* [ 82] = 65538 */ {NULL, NULL},
|
/* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA},
|
||||||
/* [ 83] = 65539 */ {NULL, NULL},
|
/* [ 83] = 5155 */ {NULL, NULL},
|
||||||
/* [ 84] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX},
|
/* [ 84] = 5156 */ {NULL, NULL},
|
||||||
/* [ 85] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
|
/* [ 85] = 5157 */ {NULL, NULL},
|
||||||
/* [ 86] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
|
/* [ 86] = 5158 */ {NULL, NULL},
|
||||||
/* [ 87] = 65543 */ {NULL, NULL},
|
/* [ 87] = 5159 */ {NULL, NULL},
|
||||||
|
/* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI},
|
||||||
|
/* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI},
|
||||||
|
/* [ 90] = 65538 */ {NULL, NULL},
|
||||||
|
/* [ 91] = 65539 */ {NULL, NULL},
|
||||||
|
/* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX},
|
||||||
|
/* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
|
||||||
|
/* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
|
||||||
|
/* [ 95] = 65543 */ {NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct __glXDispatchInfo VendorPriv_dispatch_info = {
|
const struct __glXDispatchInfo VendorPriv_dispatch_info = {
|
||||||
|
|
|
@ -195,7 +195,7 @@ int __glXDisp_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize, compsize2;
|
GLint compsize, compsize2;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -206,12 +206,11 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0, height=0;
|
GLint width=0, height=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
format = *(GLenum *)(pc + 4);
|
format = *(GLenum *)(pc + 4);
|
||||||
type = *(GLenum *)(pc + 8);
|
type = *(GLenum *)(pc + 8);
|
||||||
target = *(GLenum *)(pc + 0);
|
target = *(GLenum *)(pc + 0);
|
||||||
|
@ -260,7 +259,22 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc,
|
||||||
|
GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -271,22 +285,23 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0, height=0;
|
GLint width=0, height=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
format = *(GLenum *)(pc + 4);
|
format = *(GLenum *)(pc + 4);
|
||||||
type = *(GLenum *)(pc + 8);
|
type = *(GLenum *)(pc + 8);
|
||||||
target = *(GLenum *)(pc + 0);
|
target = *(GLenum *)(pc + 0);
|
||||||
swapBytes = *(GLboolean *)(pc + 12);
|
swapBytes = *(GLboolean *)(pc + 12);
|
||||||
|
|
||||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) );
|
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
|
||||||
|
(target, GL_CONVOLUTION_WIDTH, &width));
|
||||||
if (target == GL_CONVOLUTION_1D) {
|
if (target == GL_CONVOLUTION_1D) {
|
||||||
height = 1;
|
height = 1;
|
||||||
} else {
|
} else {
|
||||||
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) );
|
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
|
||||||
|
(target, GL_CONVOLUTION_HEIGHT, &height));
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* The two queries above might fail if we're in a state where queries
|
* The two queries above might fail if we're in a state where queries
|
||||||
|
@ -319,7 +334,21 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -330,19 +359,19 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0;
|
GLint width=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
format = *(GLenum *)(pc + 4);
|
format = *(GLenum *)(pc + 4);
|
||||||
type = *(GLenum *)(pc + 8);
|
type = *(GLenum *)(pc + 8);
|
||||||
target = *(GLenum *)(pc + 0);
|
target = *(GLenum *)(pc + 0);
|
||||||
swapBytes = *(GLboolean *)(pc + 12);
|
swapBytes = *(GLboolean *)(pc + 12);
|
||||||
reset = *(GLboolean *)(pc + 13);
|
reset = *(GLboolean *)(pc + 13);
|
||||||
|
|
||||||
CALL_GetHistogramParameteriv( GET_DISPATCH(), (target, GL_HISTOGRAM_WIDTH, &width) );
|
CALL_GetHistogramParameteriv(GET_DISPATCH(),
|
||||||
|
(target, GL_HISTOGRAM_WIDTH, &width));
|
||||||
/*
|
/*
|
||||||
* The one query above might fail if we're in a state where queries
|
* The one query above might fail if we're in a state where queries
|
||||||
* are illegal, but then width would still be zero anyway.
|
* are illegal, but then width would still be zero anyway.
|
||||||
|
@ -368,7 +397,21 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -378,12 +421,11 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||||
int error;
|
int error;
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
format = *(GLenum *)(pc + 4);
|
format = *(GLenum *)(pc + 4);
|
||||||
type = *(GLenum *)(pc + 8);
|
type = *(GLenum *)(pc + 8);
|
||||||
target = *(GLenum *)(pc + 0);
|
target = *(GLenum *)(pc + 0);
|
||||||
|
@ -410,7 +452,21 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -421,18 +477,18 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0;
|
GLint width=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
target = *(GLenum *)(pc + 0);
|
target = *(GLenum *)(pc + 0);
|
||||||
format = *(GLenum *)(pc + 4);
|
format = *(GLenum *)(pc + 4);
|
||||||
type = *(GLenum *)(pc + 8);
|
type = *(GLenum *)(pc + 8);
|
||||||
swapBytes = *(GLboolean *)(pc + 12);
|
swapBytes = *(GLboolean *)(pc + 12);
|
||||||
|
|
||||||
CALL_GetColorTableParameteriv( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) );
|
CALL_GetColorTableParameteriv(GET_DISPATCH(),
|
||||||
|
(target, GL_COLOR_TABLE_WIDTH, &width));
|
||||||
/*
|
/*
|
||||||
* The one query above might fail if we're in a state where queries
|
* The one query above might fail if we're in a state where queries
|
||||||
* are illegal, but then width would still be zero anyway.
|
* are illegal, but then width would still be zero anyway.
|
||||||
|
@ -463,55 +519,16 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDisp_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
GLenum format, type, target;
|
|
||||||
GLboolean swapBytes;
|
|
||||||
__GLXcontext *cx;
|
|
||||||
ClientPtr client = cl->client;
|
|
||||||
int error;
|
|
||||||
char *answer, answerBuffer[200];
|
|
||||||
GLint width=0;
|
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
if (!cx) {
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
target = *(GLenum *)(pc + 0);
|
|
||||||
format = *(GLenum *)(pc + 4);
|
|
||||||
type = *(GLenum *)(pc + 8);
|
|
||||||
swapBytes = *(GLboolean *)(pc + 12);
|
|
||||||
|
|
||||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) );
|
|
||||||
/*
|
|
||||||
* The one query above might fail if we're in a state where queries
|
|
||||||
* are illegal, but then width would still be zero anyway.
|
|
||||||
*/
|
|
||||||
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
|
|
||||||
if (compsize < 0) compsize = 0;
|
|
||||||
|
|
||||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
|
|
||||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
|
||||||
__glXClearErrorOccured();
|
|
||||||
CALL_GetColorTableSGI( GET_DISPATCH(), (
|
|
||||||
*(GLenum *)(pc + 0),
|
|
||||||
*(GLenum *)(pc + 4),
|
|
||||||
*(GLenum *)(pc + 8),
|
|
||||||
answer
|
|
||||||
) );
|
|
||||||
|
|
||||||
if (__glXErrorOccured()) {
|
|
||||||
__GLX_BEGIN_REPLY(0);
|
|
||||||
__GLX_SEND_HEADER();
|
|
||||||
} else {
|
|
||||||
__GLX_BEGIN_REPLY(compsize);
|
|
||||||
((xGLXGetColorTableReply *)&__glXReply)->width = width;
|
|
||||||
__GLX_SEND_HEADER();
|
|
||||||
__GLX_SEND_VOID_ARRAY(compsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,7 +219,7 @@ int __glXDispSwap_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize, compsize2;
|
GLint compsize, compsize2;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -231,12 +231,11 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0, height=0;
|
GLint width=0, height=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
__GLX_SWAP_INT(pc+0);
|
__GLX_SWAP_INT(pc+0);
|
||||||
__GLX_SWAP_INT(pc+4);
|
__GLX_SWAP_INT(pc+4);
|
||||||
__GLX_SWAP_INT(pc+8);
|
__GLX_SWAP_INT(pc+8);
|
||||||
|
@ -291,7 +290,21 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -303,12 +316,11 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0, height=0;
|
GLint width=0, height=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
__GLX_SWAP_INT(pc+0);
|
__GLX_SWAP_INT(pc+0);
|
||||||
__GLX_SWAP_INT(pc+4);
|
__GLX_SWAP_INT(pc+4);
|
||||||
__GLX_SWAP_INT(pc+8);
|
__GLX_SWAP_INT(pc+8);
|
||||||
|
@ -357,7 +369,21 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -369,12 +395,11 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0;
|
GLint width=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
__GLX_SWAP_INT(pc+0);
|
__GLX_SWAP_INT(pc+0);
|
||||||
__GLX_SWAP_INT(pc+4);
|
__GLX_SWAP_INT(pc+4);
|
||||||
__GLX_SWAP_INT(pc+8);
|
__GLX_SWAP_INT(pc+8);
|
||||||
|
@ -412,7 +437,21 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -423,12 +462,11 @@ int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
__GLX_DECLARE_SWAP_VARIABLES;
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
__GLX_SWAP_INT(pc+0);
|
__GLX_SWAP_INT(pc+0);
|
||||||
__GLX_SWAP_INT(pc+4);
|
__GLX_SWAP_INT(pc+4);
|
||||||
__GLX_SWAP_INT(pc+8);
|
__GLX_SWAP_INT(pc+8);
|
||||||
|
@ -459,7 +497,21 @@ int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
GLint compsize;
|
||||||
GLenum format, type, target;
|
GLenum format, type, target;
|
||||||
|
@ -471,12 +523,11 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||||
char *answer, answerBuffer[200];
|
char *answer, answerBuffer[200];
|
||||||
GLint width=0;
|
GLint width=0;
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
cx = __glXForceCurrent(cl, tag, &error);
|
||||||
if (!cx) {
|
if (!cx) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
pc += __GLX_SINGLE_HDR_SIZE;
|
|
||||||
__GLX_SWAP_INT(pc+0);
|
__GLX_SWAP_INT(pc+0);
|
||||||
__GLX_SWAP_INT(pc+4);
|
__GLX_SWAP_INT(pc+4);
|
||||||
__GLX_SWAP_INT(pc+8);
|
__GLX_SWAP_INT(pc+8);
|
||||||
|
@ -518,61 +569,16 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
{
|
||||||
|
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||||
|
|
||||||
|
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||||
|
}
|
||||||
|
|
||||||
int __glXDispSwap_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
|
int __glXDispSwap_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
|
||||||
{
|
{
|
||||||
GLint compsize;
|
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||||
GLenum format, type, target;
|
|
||||||
GLboolean swapBytes;
|
|
||||||
__GLXcontext *cx;
|
|
||||||
ClientPtr client = cl->client;
|
|
||||||
int error;
|
|
||||||
__GLX_DECLARE_SWAP_VARIABLES;
|
|
||||||
char *answer, answerBuffer[200];
|
|
||||||
GLint width=0;
|
|
||||||
|
|
||||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||||
if (!cx) {
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
|
||||||
__GLX_SWAP_INT(pc+0);
|
|
||||||
__GLX_SWAP_INT(pc+4);
|
|
||||||
__GLX_SWAP_INT(pc+8);
|
|
||||||
|
|
||||||
format = *(GLenum *)(pc + 4);
|
|
||||||
type = *(GLenum *)(pc + 8);
|
|
||||||
target = *(GLenum *)(pc + 0);
|
|
||||||
swapBytes = *(GLboolean *)(pc + 12);
|
|
||||||
|
|
||||||
CALL_GetColorTableParameterivSGI( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) );
|
|
||||||
/*
|
|
||||||
* The one query above might fail if we're in a state where queries
|
|
||||||
* are illegal, but then width would still be zero anyway.
|
|
||||||
*/
|
|
||||||
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
|
|
||||||
if (compsize < 0) compsize = 0;
|
|
||||||
|
|
||||||
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) );
|
|
||||||
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
|
|
||||||
__glXClearErrorOccured();
|
|
||||||
CALL_GetColorTableSGI( GET_DISPATCH(), (
|
|
||||||
*(GLenum *)(pc + 0),
|
|
||||||
*(GLenum *)(pc + 4),
|
|
||||||
*(GLenum *)(pc + 8),
|
|
||||||
answer
|
|
||||||
) );
|
|
||||||
|
|
||||||
if (__glXErrorOccured()) {
|
|
||||||
__GLX_BEGIN_REPLY(0);
|
|
||||||
__GLX_SWAP_REPLY_HEADER();
|
|
||||||
} else {
|
|
||||||
__GLX_BEGIN_REPLY(compsize);
|
|
||||||
__GLX_SWAP_REPLY_HEADER();
|
|
||||||
__GLX_SWAP_INT(&width);
|
|
||||||
((xGLXGetColorTableReply *)&__glXReply)->width = width;
|
|
||||||
__GLX_SEND_VOID_ARRAY(compsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,10 @@ MODULE_SRCS = \
|
||||||
sync.c \
|
sync.c \
|
||||||
xcmisc.c
|
xcmisc.c
|
||||||
|
|
||||||
|
# Extra configuration files ship with some extensions
|
||||||
|
SERVERCONFIGdir = $(libdir)/xserver
|
||||||
|
SERVERCONFIG_DATA =
|
||||||
|
|
||||||
# Optional sources included if extension enabled by configure.ac rules
|
# Optional sources included if extension enabled by configure.ac rules
|
||||||
|
|
||||||
# MIT Shared Memory extension
|
# MIT Shared Memory extension
|
||||||
|
@ -65,13 +69,19 @@ if XINERAMA
|
||||||
BUILTIN_SRCS += $(XINERAMA_SRCS)
|
BUILTIN_SRCS += $(XINERAMA_SRCS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# X-ACE extension: provides hooks for building security policy extensions
|
||||||
|
# like XC-Security, X-SELinux & XTSol
|
||||||
|
XACE_SRCS = xace.c xace.h xacestr.h
|
||||||
|
if XACE
|
||||||
|
BUILTIN_SRCS += $(XACE_SRCS)
|
||||||
|
endif
|
||||||
|
|
||||||
# Security extension: multi-level security to protect clients from each other
|
# Security extension: multi-level security to protect clients from each other
|
||||||
XCSECURITY_SRCS = security.c securitysrv.h
|
XCSECURITY_SRCS = security.c securitysrv.h
|
||||||
if XCSECURITY
|
if XCSECURITY
|
||||||
BUILTIN_SRCS += $(XCSECURITY_SRCS)
|
BUILTIN_SRCS += $(XCSECURITY_SRCS)
|
||||||
|
|
||||||
SERVERCONFIGdir = $(libdir)/xserver
|
SERVERCONFIG_DATA += SecurityPolicy
|
||||||
SERVERCONFIG_DATA = SecurityPolicy
|
|
||||||
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
|
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -150,11 +160,12 @@ libXextmodule_la_SOURCES = $(MODULE_SRCS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
SecurityPolicy \
|
$(SERVERCONFIG_DATA) \
|
||||||
$(MITSHM_SRCS) \
|
$(MITSHM_SRCS) \
|
||||||
$(XV_SRCS) \
|
$(XV_SRCS) \
|
||||||
$(RES_SRCS) \
|
$(RES_SRCS) \
|
||||||
$(SCREENSAVER_SRCS) \
|
$(SCREENSAVER_SRCS) \
|
||||||
|
$(XACE_SRCS) \
|
||||||
$(XCSECURITY_SRCS) \
|
$(XCSECURITY_SRCS) \
|
||||||
$(XCALIBRATE_SRCS) \
|
$(XCALIBRATE_SRCS) \
|
||||||
$(XINERAMA_SRCS) \
|
$(XINERAMA_SRCS) \
|
||||||
|
|
|
@ -41,6 +41,7 @@ from The Open Group.
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
#define _XAG_SERVER_
|
#define _XAG_SERVER_
|
||||||
#include <X11/extensions/Xagstr.h>
|
#include <X11/extensions/Xagstr.h>
|
||||||
|
#include "xacestr.h"
|
||||||
#include "securitysrv.h"
|
#include "securitysrv.h"
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
|
|
||||||
|
@ -121,62 +122,11 @@ void XagClientStateChange(
|
||||||
pointer nulldata,
|
pointer nulldata,
|
||||||
pointer calldata)
|
pointer calldata)
|
||||||
{
|
{
|
||||||
SecurityAuthorizationPtr pAuth;
|
|
||||||
NewClientInfoRec* pci = (NewClientInfoRec*) calldata;
|
NewClientInfoRec* pci = (NewClientInfoRec*) calldata;
|
||||||
ClientPtr pClient = pci->client;
|
ClientPtr pClient = pci->client;
|
||||||
AppGroupPtr pAppGrp;
|
AppGroupPtr pAppGrp = pClient->appgroup;
|
||||||
XID authId = 0;
|
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
if (!pClient->appgroup) {
|
|
||||||
switch (pClient->clientState) {
|
|
||||||
|
|
||||||
case ClientStateAuthenticating:
|
|
||||||
case ClientStateRunning:
|
|
||||||
case ClientStateCheckingSecurity:
|
|
||||||
return;
|
|
||||||
|
|
||||||
case ClientStateInitial:
|
|
||||||
case ClientStateCheckedSecurity:
|
|
||||||
/*
|
|
||||||
* If the client is connecting via a firewall proxy (which
|
|
||||||
* uses XC-QUERY-SECURITY-1, then the authId is available
|
|
||||||
* during ClientStateCheckedSecurity, otherwise it's
|
|
||||||
* available during ClientStateInitial.
|
|
||||||
*
|
|
||||||
* Don't get it from pClient because can't guarantee the order
|
|
||||||
* of the callbacks and the security extension might not have
|
|
||||||
* plugged it in yet.
|
|
||||||
*/
|
|
||||||
authId = AuthorizationIDOfClient(pClient);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ClientStateGone:
|
|
||||||
case ClientStateRetained:
|
|
||||||
/*
|
|
||||||
* Don't get if from AuthorizationIDOfClient because can't
|
|
||||||
* guarantee the order of the callbacks and the security
|
|
||||||
* extension may have torn down the client's private data
|
|
||||||
*/
|
|
||||||
authId = pClient->authId;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (authId == None)
|
|
||||||
return;
|
|
||||||
|
|
||||||
pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(pClient,
|
|
||||||
authId, SecurityAuthorizationResType, SecurityReadAccess);
|
|
||||||
|
|
||||||
if (pAuth == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next)
|
|
||||||
if (pAppGrp->appgroupId == pAuth->group) break;
|
|
||||||
} else {
|
|
||||||
pAppGrp = pClient->appgroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pAppGrp)
|
if (!pAppGrp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -233,6 +183,7 @@ XagExtensionInit(INITARGS)
|
||||||
XagResetProc,
|
XagResetProc,
|
||||||
StandardMinorOpcode)) {
|
StandardMinorOpcode)) {
|
||||||
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
||||||
|
XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -799,12 +750,33 @@ void XagGetDeltaInfo(
|
||||||
}
|
}
|
||||||
|
|
||||||
void XagCallClientStateChange(
|
void XagCallClientStateChange(
|
||||||
ClientPtr client)
|
CallbackListPtr *pcbl,
|
||||||
|
pointer nulldata,
|
||||||
|
pointer calldata)
|
||||||
{
|
{
|
||||||
if (appGrpList) {
|
XaceAuthAvailRec* rec = (XaceAuthAvailRec*) calldata;
|
||||||
|
ClientPtr pClient = rec->client;
|
||||||
|
|
||||||
|
if (!pClient->appgroup) {
|
||||||
|
SecurityAuthorizationPtr pAuth;
|
||||||
|
XID authId = rec->authId;
|
||||||
|
|
||||||
|
/* can't use SecurityLookupIDByType here -- client
|
||||||
|
* security state hasn't been setup yet.
|
||||||
|
*/
|
||||||
|
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
||||||
|
SecurityAuthorizationResType);
|
||||||
|
if (!pAuth)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pClient->appgroup = (AppGroupPtr)LookupIDByType(pAuth->group,
|
||||||
|
RT_APPGROUP);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pClient->appgroup) {
|
||||||
NewClientInfoRec clientinfo;
|
NewClientInfoRec clientinfo;
|
||||||
|
|
||||||
clientinfo.client = client;
|
clientinfo.client = pClient;
|
||||||
XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
|
XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,9 @@ extern ClientPtr XagLeader(
|
||||||
);
|
);
|
||||||
|
|
||||||
extern void XagCallClientStateChange(
|
extern void XagCallClientStateChange(
|
||||||
ClientPtr /* client */
|
CallbackListPtr * /* pcbl */,
|
||||||
|
pointer /* nulldata */,
|
||||||
|
pointer /* calldata */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern Bool XagIsControlledRoot (
|
extern Bool XagIsControlledRoot (
|
||||||
|
|
381
Xext/security.c
381
Xext/security.c
|
@ -36,6 +36,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "colormapst.h"
|
#include "colormapst.h"
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
|
#include "xacestr.h"
|
||||||
#include "securitysrv.h"
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/securstr.h>
|
#include <X11/extensions/securstr.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -58,6 +59,23 @@ in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
static int SecurityErrorBase; /* first Security error number */
|
static int SecurityErrorBase; /* first Security error number */
|
||||||
static int SecurityEventBase; /* first Security event number */
|
static int SecurityEventBase; /* first Security event number */
|
||||||
|
static int securityClientPrivateIndex;
|
||||||
|
static int securityExtnsnPrivateIndex;
|
||||||
|
|
||||||
|
/* this is what we store as client security state */
|
||||||
|
typedef struct {
|
||||||
|
unsigned int trustLevel;
|
||||||
|
XID authId;
|
||||||
|
} SecurityClientStateRec;
|
||||||
|
|
||||||
|
#define STATEVAL(extnsn) \
|
||||||
|
((extnsn)->devPrivates[securityExtnsnPrivateIndex].val)
|
||||||
|
#define STATEPTR(client) \
|
||||||
|
((client)->devPrivates[securityClientPrivateIndex].ptr)
|
||||||
|
#define TRUSTLEVEL(client) \
|
||||||
|
(((SecurityClientStateRec*)STATEPTR(client))->trustLevel)
|
||||||
|
#define AUTHID(client) \
|
||||||
|
(((SecurityClientStateRec*)STATEPTR(client))->authId)
|
||||||
|
|
||||||
CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */
|
CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */
|
||||||
|
|
||||||
|
@ -65,19 +83,8 @@ RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */
|
||||||
|
|
||||||
static RESTYPE RTEventClient;
|
static RESTYPE RTEventClient;
|
||||||
|
|
||||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
#define CALLBACK(name) static void \
|
||||||
* These are the same as the normal proc vectors except that extensions
|
name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
|
||||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
|
||||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
|
||||||
* from guessing extension major opcodes and using the extension even though
|
|
||||||
* the extension can't be listed or queried.
|
|
||||||
*/
|
|
||||||
int (*UntrustedProcVector[256])(
|
|
||||||
ClientPtr /*client*/
|
|
||||||
);
|
|
||||||
int (*SwappedUntrustedProcVector[256])(
|
|
||||||
ClientPtr /*client*/
|
|
||||||
);
|
|
||||||
|
|
||||||
/* SecurityAudit
|
/* SecurityAudit
|
||||||
*
|
*
|
||||||
|
@ -91,7 +98,7 @@ int (*SwappedUntrustedProcVector[256])(
|
||||||
* Writes the message to the log file if security logging is on.
|
* Writes the message to the log file if security logging is on.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
static void
|
||||||
SecurityAudit(char *format, ...)
|
SecurityAudit(char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -164,7 +171,7 @@ SecurityDeleteAuthorization(
|
||||||
|
|
||||||
for (i = 1; i<currentMaxClients; i++)
|
for (i = 1; i<currentMaxClients; i++)
|
||||||
{
|
{
|
||||||
if (clients[i] && (clients[i]->authId == pAuth->id))
|
if (clients[i] && (AUTHID(clients[i]) == pAuth->id))
|
||||||
CloseDownClient(clients[i]);
|
CloseDownClient(clients[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +325,7 @@ ProcSecurityQueryVersion(
|
||||||
/* paranoia: this "can't happen" because this extension is hidden
|
/* paranoia: this "can't happen" because this extension is hidden
|
||||||
* from untrusted clients, but just in case...
|
* from untrusted clients, but just in case...
|
||||||
*/
|
*/
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
||||||
|
@ -404,7 +411,7 @@ ProcSecurityGenerateAuthorization(
|
||||||
/* paranoia: this "can't happen" because this extension is hidden
|
/* paranoia: this "can't happen" because this extension is hidden
|
||||||
* from untrusted clients, but just in case...
|
* from untrusted clients, but just in case...
|
||||||
*/
|
*/
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
|
|
||||||
/* check request length */
|
/* check request length */
|
||||||
|
@ -587,7 +594,7 @@ ProcSecurityRevokeAuthorization(
|
||||||
/* paranoia: this "can't happen" because this extension is hidden
|
/* paranoia: this "can't happen" because this extension is hidden
|
||||||
* from untrusted clients, but just in case...
|
* from untrusted clients, but just in case...
|
||||||
*/
|
*/
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
||||||
|
@ -772,12 +779,12 @@ SecurityDetermineEventPropogationLimits(
|
||||||
* An audit message is generated if access is denied.
|
* An audit message is generated if access is denied.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Bool
|
CALLBACK(SecurityCheckDeviceAccess)
|
||||||
SecurityCheckDeviceAccess(client, dev, fromRequest)
|
|
||||||
ClientPtr client;
|
|
||||||
DeviceIntPtr dev;
|
|
||||||
Bool fromRequest;
|
|
||||||
{
|
{
|
||||||
|
XaceDeviceAccessRec *rec = (XaceDeviceAccessRec*)calldata;
|
||||||
|
ClientPtr client = rec->client;
|
||||||
|
DeviceIntPtr dev = rec->dev;
|
||||||
|
Bool fromRequest = rec->fromRequest;
|
||||||
WindowPtr pWin, pStopWin;
|
WindowPtr pWin, pStopWin;
|
||||||
Bool untrusted_got_event;
|
Bool untrusted_got_event;
|
||||||
Bool found_event_window;
|
Bool found_event_window;
|
||||||
|
@ -785,12 +792,12 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
||||||
int reqtype = 0;
|
int reqtype = 0;
|
||||||
|
|
||||||
/* trusted clients always allowed to do anything */
|
/* trusted clients always allowed to do anything */
|
||||||
if (client->trustLevel == XSecurityClientTrusted)
|
if (TRUSTLEVEL(client) == XSecurityClientTrusted)
|
||||||
return TRUE;
|
return;
|
||||||
|
|
||||||
/* device security other than keyboard is not implemented yet */
|
/* device security other than keyboard is not implemented yet */
|
||||||
if (dev != inputInfo.keyboard)
|
if (dev != inputInfo.keyboard)
|
||||||
return TRUE;
|
return;
|
||||||
|
|
||||||
/* some untrusted client wants access */
|
/* some untrusted client wants access */
|
||||||
|
|
||||||
|
@ -805,7 +812,8 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
||||||
case X_SetModifierMapping:
|
case X_SetModifierMapping:
|
||||||
SecurityAudit("client %d attempted request %d\n",
|
SecurityAudit("client %d attempted request %d\n",
|
||||||
client->index, reqtype);
|
client->index, reqtype);
|
||||||
return FALSE;
|
rec->rval = FALSE;
|
||||||
|
return;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -817,7 +825,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
||||||
if (dev->grab)
|
if (dev->grab)
|
||||||
{
|
{
|
||||||
untrusted_got_event =
|
untrusted_got_event =
|
||||||
((rClient(dev->grab))->trustLevel != XSecurityClientTrusted);
|
(TRUSTLEVEL(rClient(dev->grab)) != XSecurityClientTrusted);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -832,7 +840,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
||||||
{
|
{
|
||||||
found_event_window = TRUE;
|
found_event_window = TRUE;
|
||||||
client = wClient(pWin);
|
client = wClient(pWin);
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||||
{
|
{
|
||||||
untrusted_got_event = TRUE;
|
untrusted_got_event = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -845,7 +853,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
||||||
if (other->mask & eventmask)
|
if (other->mask & eventmask)
|
||||||
{
|
{
|
||||||
client = rClient(other);
|
client = rClient(other);
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
|
||||||
{
|
{
|
||||||
untrusted_got_event = TRUE;
|
untrusted_got_event = TRUE;
|
||||||
break;
|
break;
|
||||||
|
@ -873,8 +881,9 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
|
||||||
else
|
else
|
||||||
SecurityAudit("client %d attempted to access device %d (%s)\n",
|
SecurityAudit("client %d attempted to access device %d (%s)\n",
|
||||||
client->index, dev->id, devname);
|
client->index, dev->id, devname);
|
||||||
|
rec->rval = FALSE;
|
||||||
}
|
}
|
||||||
return untrusted_got_event;
|
return;
|
||||||
} /* SecurityCheckDeviceAccess */
|
} /* SecurityCheckDeviceAccess */
|
||||||
|
|
||||||
|
|
||||||
|
@ -946,20 +955,22 @@ SecurityAuditResourceIDAccess(
|
||||||
* Disallowed resource accesses are audited.
|
* Disallowed resource accesses are audited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static pointer
|
CALLBACK(SecurityCheckResourceIDAccess)
|
||||||
SecurityCheckResourceIDAccess(
|
|
||||||
ClientPtr client,
|
|
||||||
XID id,
|
|
||||||
RESTYPE rtype,
|
|
||||||
Mask access_mode,
|
|
||||||
pointer rval)
|
|
||||||
{
|
{
|
||||||
int cid = CLIENT_ID(id);
|
XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata;
|
||||||
int reqtype = ((xReq *)client->requestBuffer)->reqType;
|
ClientPtr client = rec->client;
|
||||||
|
XID id = rec->id;
|
||||||
|
RESTYPE rtype = rec->rtype;
|
||||||
|
Mask access_mode = rec->access_mode;
|
||||||
|
pointer rval = rec->res;
|
||||||
|
int cid, reqtype;
|
||||||
|
|
||||||
if (SecurityUnknownAccess == access_mode)
|
if (TRUSTLEVEL(client) == XSecurityClientTrusted ||
|
||||||
return rval; /* for compatibility, we have to allow access */
|
SecurityUnknownAccess == access_mode)
|
||||||
|
return; /* for compatibility, we have to allow access */
|
||||||
|
|
||||||
|
cid = CLIENT_ID(id);
|
||||||
|
reqtype = ((xReq *)client->requestBuffer)->reqType;
|
||||||
switch (reqtype)
|
switch (reqtype)
|
||||||
{ /* these are always allowed */
|
{ /* these are always allowed */
|
||||||
case X_QueryTree:
|
case X_QueryTree:
|
||||||
|
@ -971,7 +982,7 @@ SecurityCheckResourceIDAccess(
|
||||||
case X_DeleteProperty:
|
case X_DeleteProperty:
|
||||||
case X_RotateProperties:
|
case X_RotateProperties:
|
||||||
case X_ListProperties:
|
case X_ListProperties:
|
||||||
return rval;
|
return;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -991,15 +1002,15 @@ SecurityCheckResourceIDAccess(
|
||||||
* competing alternative for grouping clients for security purposes is to
|
* competing alternative for grouping clients for security purposes is to
|
||||||
* use app groups. dpw
|
* use app groups. dpw
|
||||||
*/
|
*/
|
||||||
if (client->trustLevel == clients[cid]->trustLevel
|
if (TRUSTLEVEL(client) == TRUSTLEVEL(clients[cid])
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
|| (RT_COLORMAP == rtype &&
|
|| (RT_COLORMAP == rtype &&
|
||||||
XagDefaultColormap (client) == (Colormap) id)
|
XagDefaultColormap (client) == (Colormap) id)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
return rval;
|
return;
|
||||||
else
|
else
|
||||||
return SecurityAuditResourceIDAccess(client, id);
|
goto deny;
|
||||||
}
|
}
|
||||||
else /* server-owned resource - probably a default colormap or root window */
|
else /* server-owned resource - probably a default colormap or root window */
|
||||||
{
|
{
|
||||||
|
@ -1035,7 +1046,7 @@ SecurityCheckResourceIDAccess(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{ /* not an ICCCM event */
|
{ /* not an ICCCM event */
|
||||||
return SecurityAuditResourceIDAccess(client, id);
|
goto deny;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} /* case X_SendEvent on root */
|
} /* case X_SendEvent on root */
|
||||||
|
@ -1053,28 +1064,31 @@ SecurityCheckResourceIDAccess(
|
||||||
~(PropertyChangeMask|StructureNotifyMask)) == 0)
|
~(PropertyChangeMask|StructureNotifyMask)) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return SecurityAuditResourceIDAccess(client, id);
|
goto deny;
|
||||||
} /* case X_ChangeWindowAttributes on root */
|
} /* case X_ChangeWindowAttributes on root */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
/* others not allowed */
|
/* others not allowed */
|
||||||
return SecurityAuditResourceIDAccess(client, id);
|
goto deny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* end server-owned window or drawable */
|
} /* end server-owned window or drawable */
|
||||||
else if (SecurityAuthorizationResType == rtype)
|
else if (SecurityAuthorizationResType == rtype)
|
||||||
{
|
{
|
||||||
SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)rval;
|
SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)rval;
|
||||||
if (pAuth->trustLevel != client->trustLevel)
|
if (pAuth->trustLevel != TRUSTLEVEL(client))
|
||||||
return SecurityAuditResourceIDAccess(client, id);
|
goto deny;
|
||||||
}
|
}
|
||||||
else if (RT_COLORMAP != rtype)
|
else if (RT_COLORMAP != rtype)
|
||||||
{ /* don't allow anything else besides colormaps */
|
{ /* don't allow anything else besides colormaps */
|
||||||
return SecurityAuditResourceIDAccess(client, id);
|
goto deny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rval;
|
return;
|
||||||
|
deny:
|
||||||
|
SecurityAuditResourceIDAccess(client, id);
|
||||||
|
rec->rval = FALSE; /* deny access */
|
||||||
} /* SecurityCheckResourceIDAccess */
|
} /* SecurityCheckResourceIDAccess */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1093,30 +1107,32 @@ SecurityCheckResourceIDAccess(
|
||||||
* If a new client is connecting, its authorization ID is copied to
|
* If a new client is connecting, its authorization ID is copied to
|
||||||
* client->authID. If this is a generated authorization, its reference
|
* client->authID. If this is a generated authorization, its reference
|
||||||
* count is bumped, its timer is cancelled if it was running, and its
|
* count is bumped, its timer is cancelled if it was running, and its
|
||||||
* trustlevel is copied to client->trustLevel.
|
* trustlevel is copied to TRUSTLEVEL(client).
|
||||||
*
|
*
|
||||||
* If a client is disconnecting and the client was using a generated
|
* If a client is disconnecting and the client was using a generated
|
||||||
* authorization, the authorization's reference count is decremented, and
|
* authorization, the authorization's reference count is decremented, and
|
||||||
* if it is now zero, the timer for this authorization is started.
|
* if it is now zero, the timer for this authorization is started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
CALLBACK(SecurityClientStateCallback)
|
||||||
SecurityClientStateCallback(
|
|
||||||
CallbackListPtr *pcbl,
|
|
||||||
pointer nulldata,
|
|
||||||
pointer calldata)
|
|
||||||
{
|
{
|
||||||
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
|
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
|
||||||
ClientPtr client = pci->client;
|
ClientPtr client = pci->client;
|
||||||
|
|
||||||
switch (client->clientState)
|
switch (client->clientState)
|
||||||
{
|
{
|
||||||
|
case ClientStateInitial:
|
||||||
|
TRUSTLEVEL(serverClient) = XSecurityClientTrusted;
|
||||||
|
AUTHID(serverClient) = None;
|
||||||
|
break;
|
||||||
|
|
||||||
case ClientStateRunning:
|
case ClientStateRunning:
|
||||||
{
|
{
|
||||||
XID authId = AuthorizationIDOfClient(client);
|
XID authId = AuthorizationIDOfClient(client);
|
||||||
SecurityAuthorizationPtr pAuth;
|
SecurityAuthorizationPtr pAuth;
|
||||||
|
|
||||||
client->authId = authId;
|
TRUSTLEVEL(client) = XSecurityClientTrusted;
|
||||||
|
AUTHID(client) = authId;
|
||||||
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
||||||
SecurityAuthorizationResType);
|
SecurityAuthorizationResType);
|
||||||
if (pAuth)
|
if (pAuth)
|
||||||
|
@ -1126,23 +1142,20 @@ SecurityClientStateCallback(
|
||||||
{
|
{
|
||||||
if (pAuth->timer) TimerCancel(pAuth->timer);
|
if (pAuth->timer) TimerCancel(pAuth->timer);
|
||||||
}
|
}
|
||||||
client->trustLevel = pAuth->trustLevel;
|
TRUSTLEVEL(client) = pAuth->trustLevel;
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
|
||||||
{
|
|
||||||
client->CheckAccess = SecurityCheckResourceIDAccess;
|
|
||||||
client->requestVector = client->swapped ?
|
|
||||||
SwappedUntrustedProcVector : UntrustedProcVector;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ClientStateGone:
|
case ClientStateGone:
|
||||||
case ClientStateRetained: /* client disconnected */
|
case ClientStateRetained: /* client disconnected */
|
||||||
{
|
{
|
||||||
XID authId = client->authId;
|
|
||||||
SecurityAuthorizationPtr pAuth;
|
SecurityAuthorizationPtr pAuth;
|
||||||
|
|
||||||
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
/* client may not have any state (bad authorization) */
|
||||||
|
if (!STATEPTR(client))
|
||||||
|
break;
|
||||||
|
|
||||||
|
pAuth = (SecurityAuthorizationPtr)LookupIDByType(AUTHID(client),
|
||||||
SecurityAuthorizationResType);
|
SecurityAuthorizationResType);
|
||||||
if (pAuth)
|
if (pAuth)
|
||||||
{ /* it is a generated authorization */
|
{ /* it is a generated authorization */
|
||||||
|
@ -1158,124 +1171,68 @@ SecurityClientStateCallback(
|
||||||
}
|
}
|
||||||
} /* SecurityClientStateCallback */
|
} /* SecurityClientStateCallback */
|
||||||
|
|
||||||
/* SecurityCensorImage
|
CALLBACK(SecurityCheckDrawableAccess)
|
||||||
*
|
|
||||||
* Called after pScreen->GetImage to prevent pieces or trusted windows from
|
|
||||||
* being returned in image data from an untrusted window.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* client is the client doing the GetImage.
|
|
||||||
* pVisibleRegion is the visible region of the window.
|
|
||||||
* widthBytesLine is the width in bytes of one horizontal line in pBuf.
|
|
||||||
* pDraw is the source window.
|
|
||||||
* x, y, w, h is the rectangle of image data from pDraw in pBuf.
|
|
||||||
* format is the format of the image data in pBuf: ZPixmap or XYPixmap.
|
|
||||||
* pBuf is the image data.
|
|
||||||
*
|
|
||||||
* Returns: nothing.
|
|
||||||
*
|
|
||||||
* Side Effects:
|
|
||||||
* Any part of the rectangle (x, y, w, h) that is outside the visible
|
|
||||||
* region of the window will be destroyed (overwritten) in pBuf.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
|
|
||||||
format, pBuf)
|
|
||||||
ClientPtr client;
|
|
||||||
RegionPtr pVisibleRegion;
|
|
||||||
long widthBytesLine;
|
|
||||||
DrawablePtr pDraw;
|
|
||||||
int x, y, w, h;
|
|
||||||
unsigned int format;
|
|
||||||
char * pBuf;
|
|
||||||
{
|
{
|
||||||
RegionRec imageRegion; /* region representing x,y,w,h */
|
XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata;
|
||||||
RegionRec censorRegion; /* region to obliterate */
|
|
||||||
BoxRec imageBox;
|
|
||||||
int nRects;
|
|
||||||
|
|
||||||
imageBox.x1 = x;
|
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
|
||||||
imageBox.y1 = y;
|
rec->rval = FALSE;
|
||||||
imageBox.x2 = x + w;
|
|
||||||
imageBox.y2 = y + h;
|
|
||||||
REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
|
|
||||||
REGION_NULL(pScreen, &censorRegion);
|
|
||||||
|
|
||||||
/* censorRegion = imageRegion - visibleRegion */
|
|
||||||
REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
|
|
||||||
nRects = REGION_NUM_RECTS(&censorRegion);
|
|
||||||
if (nRects > 0)
|
|
||||||
{ /* we have something to censor */
|
|
||||||
GCPtr pScratchGC = NULL;
|
|
||||||
PixmapPtr pPix = NULL;
|
|
||||||
xRectangle *pRects = NULL;
|
|
||||||
Bool failed = FALSE;
|
|
||||||
int depth = 1;
|
|
||||||
int bitsPerPixel = 1;
|
|
||||||
int i;
|
|
||||||
BoxPtr pBox;
|
|
||||||
|
|
||||||
/* convert region to list-of-rectangles for PolyFillRect */
|
|
||||||
|
|
||||||
pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *));
|
|
||||||
if (!pRects)
|
|
||||||
{
|
|
||||||
failed = TRUE;
|
|
||||||
goto failSafe;
|
|
||||||
}
|
|
||||||
for (pBox = REGION_RECTS(&censorRegion), i = 0;
|
|
||||||
i < nRects;
|
|
||||||
i++, pBox++)
|
|
||||||
{
|
|
||||||
pRects[i].x = pBox->x1;
|
|
||||||
pRects[i].y = pBox->y1 - imageBox.y1;
|
|
||||||
pRects[i].width = pBox->x2 - pBox->x1;
|
|
||||||
pRects[i].height = pBox->y2 - pBox->y1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use pBuf as a fake pixmap */
|
CALLBACK(SecurityCheckMapAccess)
|
||||||
|
|
||||||
if (format == ZPixmap)
|
|
||||||
{
|
{
|
||||||
depth = pDraw->depth;
|
XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata;
|
||||||
bitsPerPixel = pDraw->bitsPerPixel;
|
WindowPtr pWin = rec->pWin;
|
||||||
|
|
||||||
|
if (STATEPTR(rec->client) &&
|
||||||
|
(TRUSTLEVEL(rec->client) != XSecurityClientTrusted) &&
|
||||||
|
(pWin->drawable.class == InputOnly) &&
|
||||||
|
(TRUSTLEVEL(wClient(pWin->parent)) == XSecurityClientTrusted))
|
||||||
|
|
||||||
|
rec->rval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h,
|
CALLBACK(SecurityCheckBackgrndAccess)
|
||||||
depth, bitsPerPixel,
|
|
||||||
widthBytesLine, (pointer)pBuf);
|
|
||||||
if (!pPix)
|
|
||||||
{
|
{
|
||||||
failed = TRUE;
|
XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata;
|
||||||
goto failSafe;
|
|
||||||
|
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
|
||||||
|
rec->rval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen);
|
CALLBACK(SecurityCheckExtAccess)
|
||||||
if (!pScratchGC)
|
|
||||||
{
|
{
|
||||||
failed = TRUE;
|
XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata;
|
||||||
goto failSafe;
|
|
||||||
|
if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) &&
|
||||||
|
!STATEVAL(rec->ext))
|
||||||
|
|
||||||
|
rec->rval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ValidateGC(&pPix->drawable, pScratchGC);
|
CALLBACK(SecurityCheckHostlistAccess)
|
||||||
(* pScratchGC->ops->PolyFillRect)(&pPix->drawable,
|
|
||||||
pScratchGC, nRects, pRects);
|
|
||||||
|
|
||||||
failSafe:
|
|
||||||
if (failed)
|
|
||||||
{
|
{
|
||||||
/* Censoring was not completed above. To be safe, wipe out
|
XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata;
|
||||||
* all the image data so that nothing trusted gets out.
|
|
||||||
*/
|
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
|
||||||
bzero(pBuf, (int)(widthBytesLine * h));
|
{
|
||||||
|
rec->rval = FALSE;
|
||||||
|
if (rec->access_mode == SecurityWriteAccess)
|
||||||
|
SecurityAudit("client %d attempted to change host access\n",
|
||||||
|
rec->client->index);
|
||||||
|
else
|
||||||
|
SecurityAudit("client %d attempted to list hosts\n",
|
||||||
|
rec->client->index);
|
||||||
}
|
}
|
||||||
if (pRects) DEALLOCATE_LOCAL(pRects);
|
|
||||||
if (pScratchGC) FreeScratchGC(pScratchGC);
|
|
||||||
if (pPix) FreeScratchPixmapHeader(pPix);
|
|
||||||
}
|
}
|
||||||
REGION_UNINIT(pScreen, &imageRegion);
|
|
||||||
REGION_UNINIT(pScreen, &censorRegion);
|
CALLBACK(SecurityDeclareExtSecure)
|
||||||
} /* SecurityCensorImage */
|
{
|
||||||
|
XaceDeclareExtSecureRec *rec = (XaceDeclareExtSecureRec*)calldata;
|
||||||
|
|
||||||
|
/* security state for extensions is simply a boolean trust value */
|
||||||
|
STATEVAL(rec->ext) = rec->secure;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
|
@ -1734,21 +1691,21 @@ SecurityMatchString(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
char
|
CALLBACK(SecurityCheckPropertyAccess)
|
||||||
SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
|
|
||||||
ClientPtr client;
|
|
||||||
WindowPtr pWin;
|
|
||||||
ATOM propertyName;
|
|
||||||
Mask access_mode;
|
|
||||||
{
|
{
|
||||||
|
XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata;
|
||||||
|
ClientPtr client = rec->client;
|
||||||
|
WindowPtr pWin = rec->pWin;
|
||||||
|
ATOM propertyName = rec->propertyName;
|
||||||
|
Mask access_mode = rec->access_mode;
|
||||||
PropertyAccessPtr pacl;
|
PropertyAccessPtr pacl;
|
||||||
char action = SecurityDefaultAction;
|
char action = SecurityDefaultAction;
|
||||||
|
|
||||||
/* if client trusted or window untrusted, allow operation */
|
/* if client trusted or window untrusted, allow operation */
|
||||||
|
|
||||||
if ( (client->trustLevel == XSecurityClientTrusted) ||
|
if ( (TRUSTLEVEL(client) == XSecurityClientTrusted) ||
|
||||||
(wClient(pWin)->trustLevel != XSecurityClientTrusted) )
|
(TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) )
|
||||||
return SecurityAllowOperation;
|
return;
|
||||||
|
|
||||||
#ifdef PROPDEBUG
|
#ifdef PROPDEBUG
|
||||||
/* For testing, it's more convenient if the property rules file gets
|
/* For testing, it's more convenient if the property rules file gets
|
||||||
|
@ -1861,7 +1818,9 @@ SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
|
||||||
client->index, reqtype, pWin->drawable.id,
|
client->index, reqtype, pWin->drawable.id,
|
||||||
NameForAtom(propertyName), propertyName, cid, actionstr);
|
NameForAtom(propertyName), propertyName, cid, actionstr);
|
||||||
}
|
}
|
||||||
return action;
|
/* return codes increase with strictness */
|
||||||
|
if (action > rec->rval)
|
||||||
|
rec->rval = action;
|
||||||
} /* SecurityCheckPropertyAccess */
|
} /* SecurityCheckPropertyAccess */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1901,6 +1860,46 @@ XSecurityOptions(argc, argv, i)
|
||||||
} /* XSecurityOptions */
|
} /* XSecurityOptions */
|
||||||
|
|
||||||
|
|
||||||
|
/* SecurityExtensionSetup
|
||||||
|
*
|
||||||
|
* Arguments: none.
|
||||||
|
*
|
||||||
|
* Returns: nothing.
|
||||||
|
*
|
||||||
|
* Side Effects:
|
||||||
|
* Sets up the Security extension if possible.
|
||||||
|
* This function contains things that need to be done
|
||||||
|
* before any other extension init functions get called.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
SecurityExtensionSetup(INITARGS)
|
||||||
|
{
|
||||||
|
/* Allocate the client private index */
|
||||||
|
securityClientPrivateIndex = AllocateClientPrivateIndex();
|
||||||
|
if (!AllocateClientPrivate(securityClientPrivateIndex,
|
||||||
|
sizeof (SecurityClientStateRec)))
|
||||||
|
FatalError("SecurityExtensionSetup: Can't allocate client private.\n");
|
||||||
|
|
||||||
|
/* Allocate the extension private index */
|
||||||
|
securityExtnsnPrivateIndex = AllocateExtensionPrivateIndex();
|
||||||
|
if (!AllocateExtensionPrivate(securityExtnsnPrivateIndex, 0))
|
||||||
|
FatalError("SecurityExtensionSetup: Can't allocate extnsn private.\n");
|
||||||
|
|
||||||
|
/* register callbacks */
|
||||||
|
#define XaceRC XaceRegisterCallback
|
||||||
|
XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL);
|
||||||
|
XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL);
|
||||||
|
XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL);
|
||||||
|
XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL);
|
||||||
|
XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL);
|
||||||
|
XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL);
|
||||||
|
XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL);
|
||||||
|
XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL);
|
||||||
|
XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL);
|
||||||
|
XaceRC(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, NULL);
|
||||||
|
} /* SecurityExtensionSetup */
|
||||||
|
|
||||||
|
|
||||||
/* SecurityExtensionInit
|
/* SecurityExtensionInit
|
||||||
*
|
*
|
||||||
|
@ -1916,7 +1915,6 @@ void
|
||||||
SecurityExtensionInit(INITARGS)
|
SecurityExtensionInit(INITARGS)
|
||||||
{
|
{
|
||||||
ExtensionEntry *extEntry;
|
ExtensionEntry *extEntry;
|
||||||
int i;
|
|
||||||
|
|
||||||
SecurityAuthorizationResType =
|
SecurityAuthorizationResType =
|
||||||
CreateNewResourceType(SecurityDeleteAuthorization);
|
CreateNewResourceType(SecurityDeleteAuthorization);
|
||||||
|
@ -1943,25 +1941,6 @@ SecurityExtensionInit(INITARGS)
|
||||||
EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] =
|
EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] =
|
||||||
(EventSwapPtr)SwapSecurityAuthorizationRevokedEvent;
|
(EventSwapPtr)SwapSecurityAuthorizationRevokedEvent;
|
||||||
|
|
||||||
/* initialize untrusted proc vectors */
|
|
||||||
|
|
||||||
for (i = 0; i < 128; i++)
|
|
||||||
{
|
|
||||||
UntrustedProcVector[i] = ProcVector[i];
|
|
||||||
SwappedUntrustedProcVector[i] = SwappedProcVector[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* make sure insecure extensions are not allowed */
|
|
||||||
|
|
||||||
for (i = 128; i < 256; i++)
|
|
||||||
{
|
|
||||||
if (!UntrustedProcVector[i])
|
|
||||||
{
|
|
||||||
UntrustedProcVector[i] = ProcBadRequest;
|
|
||||||
SwappedUntrustedProcVector[i] = ProcBadRequest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SecurityLoadPropertyAccessList();
|
SecurityLoadPropertyAccessList();
|
||||||
|
|
||||||
} /* SecurityExtensionInit */
|
} /* SecurityExtensionInit */
|
||||||
|
|
|
@ -86,46 +86,11 @@ typedef struct {
|
||||||
Bool valid; /* did anyone recognize it? if so, set to TRUE */
|
Bool valid; /* did anyone recognize it? if so, set to TRUE */
|
||||||
} SecurityValidateGroupInfoRec;
|
} SecurityValidateGroupInfoRec;
|
||||||
|
|
||||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
|
||||||
* These are the same as the normal proc vectors except that extensions
|
|
||||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
|
||||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
|
||||||
* from guessing extension major opcodes and using the extension even though
|
|
||||||
* the extension can't be listed or queried.
|
|
||||||
*/
|
|
||||||
extern int (*UntrustedProcVector[256])(ClientPtr client);
|
|
||||||
extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
|
|
||||||
|
|
||||||
extern Bool SecurityCheckDeviceAccess(ClientPtr client, DeviceIntPtr dev,
|
|
||||||
Bool fromRequest);
|
|
||||||
|
|
||||||
extern void SecurityAudit(char *format, ...);
|
|
||||||
|
|
||||||
extern int XSecurityOptions(int argc, char **argv, int i);
|
extern int XSecurityOptions(int argc, char **argv, int i);
|
||||||
|
|
||||||
/* Give this value or higher to the -audit option to get security messages */
|
/* Give this value or higher to the -audit option to get security messages */
|
||||||
#define SECURITY_AUDIT_LEVEL 4
|
#define SECURITY_AUDIT_LEVEL 4
|
||||||
|
|
||||||
extern void SecurityCensorImage(
|
|
||||||
ClientPtr client,
|
|
||||||
RegionPtr pVisibleRegion,
|
|
||||||
long widthBytesLine,
|
|
||||||
DrawablePtr pDraw,
|
|
||||||
int x, int y, int w, int h,
|
|
||||||
unsigned int format,
|
|
||||||
char * pBuf);
|
|
||||||
|
|
||||||
#define SecurityAllowOperation 0
|
|
||||||
#define SecurityIgnoreOperation 1
|
|
||||||
#define SecurityErrorOperation 2
|
|
||||||
|
|
||||||
extern char
|
|
||||||
SecurityCheckPropertyAccess(
|
|
||||||
ClientPtr client,
|
|
||||||
WindowPtr pWin,
|
|
||||||
ATOM propertyName,
|
|
||||||
Mask access_mode);
|
|
||||||
|
|
||||||
#define SECURITY_POLICY_FILE_VERSION "version-1"
|
#define SECURITY_POLICY_FILE_VERSION "version-1"
|
||||||
|
|
||||||
extern char **SecurityGetSitePolicyStrings(int *n);
|
extern char **SecurityGetSitePolicyStrings(int *n);
|
||||||
|
|
|
@ -0,0 +1,496 @@
|
||||||
|
/************************************************************
|
||||||
|
|
||||||
|
Author: Eamon Walsh <ewalsh@epoch.ncsc.mil>
|
||||||
|
|
||||||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
this permission notice appear in supporting documentation. This permission
|
||||||
|
notice shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
********************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
|
#include <dix-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include "windowstr.h"
|
||||||
|
#include "scrnintstr.h"
|
||||||
|
#include "gcstruct.h"
|
||||||
|
#include "xacestr.h"
|
||||||
|
#include "modinit.h"
|
||||||
|
|
||||||
|
CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0};
|
||||||
|
|
||||||
|
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||||
|
* These are the same as the normal proc vectors except that extensions
|
||||||
|
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||||
|
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||||
|
* from guessing extension major opcodes and using the extension even though
|
||||||
|
* the extension can't be listed or queried.
|
||||||
|
*/
|
||||||
|
int (*UntrustedProcVector[256])(
|
||||||
|
ClientPtr /*client*/
|
||||||
|
);
|
||||||
|
int (*SwappedUntrustedProcVector[256])(
|
||||||
|
ClientPtr /*client*/
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Entry point for hook functions. Called by Xserver.
|
||||||
|
*/
|
||||||
|
int XaceHook(int hook, ...)
|
||||||
|
{
|
||||||
|
pointer calldata; /* data passed to callback */
|
||||||
|
int *prv = NULL; /* points to return value from callback */
|
||||||
|
va_list ap; /* argument list */
|
||||||
|
va_start(ap, hook);
|
||||||
|
|
||||||
|
/* Marshal arguments for passing to callback.
|
||||||
|
* Each callback has its own case, which sets up a structure to hold
|
||||||
|
* the arguments and integer return parameter, or in some cases just
|
||||||
|
* sets calldata directly to a single argument (with no return result)
|
||||||
|
*/
|
||||||
|
switch (hook)
|
||||||
|
{
|
||||||
|
case XACE_CORE_DISPATCH: {
|
||||||
|
XaceCoreDispatchRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
TRUE /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_RESOURCE_ACCESS: {
|
||||||
|
XaceResourceAccessRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, XID),
|
||||||
|
va_arg(ap, RESTYPE),
|
||||||
|
va_arg(ap, Mask),
|
||||||
|
va_arg(ap, pointer),
|
||||||
|
TRUE /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_DEVICE_ACCESS: {
|
||||||
|
XaceDeviceAccessRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, DeviceIntPtr),
|
||||||
|
va_arg(ap, Bool),
|
||||||
|
TRUE /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_PROPERTY_ACCESS: {
|
||||||
|
XacePropertyAccessRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, WindowPtr),
|
||||||
|
va_arg(ap, Atom),
|
||||||
|
va_arg(ap, Mask),
|
||||||
|
SecurityAllowOperation /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_DRAWABLE_ACCESS: {
|
||||||
|
XaceDrawableAccessRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, DrawablePtr),
|
||||||
|
TRUE /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_MAP_ACCESS:
|
||||||
|
case XACE_BACKGRND_ACCESS: {
|
||||||
|
XaceMapAccessRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, WindowPtr),
|
||||||
|
TRUE /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_EXT_DISPATCH:
|
||||||
|
case XACE_EXT_ACCESS: {
|
||||||
|
XaceExtAccessRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, ExtensionEntry*),
|
||||||
|
TRUE /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_HOSTLIST_ACCESS: {
|
||||||
|
XaceHostlistAccessRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, Mask),
|
||||||
|
TRUE /* default allow */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_SITE_POLICY: {
|
||||||
|
XaceSitePolicyRec rec = {
|
||||||
|
va_arg(ap, char*),
|
||||||
|
va_arg(ap, int),
|
||||||
|
FALSE /* default unrecognized */
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
prv = &rec.rval;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_DECLARE_EXT_SECURE: {
|
||||||
|
XaceDeclareExtSecureRec rec = {
|
||||||
|
va_arg(ap, ExtensionEntry*),
|
||||||
|
va_arg(ap, Bool)
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_AUTH_AVAIL: {
|
||||||
|
XaceAuthAvailRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, XID)
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_KEY_AVAIL: {
|
||||||
|
XaceKeyAvailRec rec = {
|
||||||
|
va_arg(ap, xEventPtr),
|
||||||
|
va_arg(ap, DeviceIntPtr),
|
||||||
|
va_arg(ap, int)
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_WINDOW_INIT: {
|
||||||
|
XaceWindowRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, WindowPtr)
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_AUDIT_BEGIN: {
|
||||||
|
XaceAuditRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
0
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XACE_AUDIT_END: {
|
||||||
|
XaceAuditRec rec = {
|
||||||
|
va_arg(ap, ClientPtr),
|
||||||
|
va_arg(ap, int)
|
||||||
|
};
|
||||||
|
calldata = &rec;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
va_end(ap);
|
||||||
|
return 0; /* unimplemented hook number */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
/* call callbacks and return result, if any. */
|
||||||
|
CallCallbacks(&XaceHooks[hook], calldata);
|
||||||
|
return prv ? *prv : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ProcXaceDispatch(ClientPtr client)
|
||||||
|
{
|
||||||
|
REQUEST(xReq);
|
||||||
|
|
||||||
|
switch (stuff->data)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
return BadRequest;
|
||||||
|
}
|
||||||
|
} /* ProcXaceDispatch */
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcXaceDispatch(ClientPtr client)
|
||||||
|
{
|
||||||
|
REQUEST(xReq);
|
||||||
|
|
||||||
|
switch (stuff->data)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
return BadRequest;
|
||||||
|
}
|
||||||
|
} /* SProcXaceDispatch */
|
||||||
|
|
||||||
|
|
||||||
|
/* XaceResetProc
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* extEntry is the extension information for the XACE extension.
|
||||||
|
*
|
||||||
|
* Returns: nothing.
|
||||||
|
*
|
||||||
|
* Side Effects:
|
||||||
|
* Performs any cleanup needed by XACE at server shutdown time.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
XaceResetProc(ExtensionEntry *extEntry)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=0; i<XACE_NUM_HOOKS; i++)
|
||||||
|
{
|
||||||
|
DeleteCallbackList(&XaceHooks[i]);
|
||||||
|
XaceHooks[i] = NULL;
|
||||||
|
}
|
||||||
|
} /* XaceResetProc */
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
XaceCatchDispatchProc(ClientPtr client)
|
||||||
|
{
|
||||||
|
REQUEST(xReq);
|
||||||
|
int major = stuff->reqType;
|
||||||
|
|
||||||
|
if (!ProcVector[major])
|
||||||
|
return (BadRequest);
|
||||||
|
|
||||||
|
if (!XaceHook(XACE_CORE_DISPATCH, client))
|
||||||
|
return (BadAccess);
|
||||||
|
|
||||||
|
return client->swapped ?
|
||||||
|
(* SwappedProcVector[major])(client) :
|
||||||
|
(* ProcVector[major])(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
XaceCatchExtProc(ClientPtr client)
|
||||||
|
{
|
||||||
|
REQUEST(xReq);
|
||||||
|
int major = stuff->reqType;
|
||||||
|
ExtensionEntry *ext = GetExtensionEntry(major);
|
||||||
|
|
||||||
|
if (!ext || !ProcVector[major])
|
||||||
|
return (BadRequest);
|
||||||
|
|
||||||
|
if (!XaceHook(XACE_EXT_DISPATCH, client, ext))
|
||||||
|
return (BadRequest); /* pretend extension doesn't exist */
|
||||||
|
|
||||||
|
return client->swapped ?
|
||||||
|
(* SwappedProcVector[major])(client) :
|
||||||
|
(* ProcVector[major])(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* SecurityClientStateCallback
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* pcbl is &ClientStateCallback.
|
||||||
|
* nullata is NULL.
|
||||||
|
* calldata is a pointer to a NewClientInfoRec (include/dixstruct.h)
|
||||||
|
* which contains information about client state changes.
|
||||||
|
*
|
||||||
|
* Returns: nothing.
|
||||||
|
*
|
||||||
|
* Side Effects:
|
||||||
|
*
|
||||||
|
* If a new client is connecting, its authorization ID is copied to
|
||||||
|
* client->authID. If this is a generated authorization, its reference
|
||||||
|
* count is bumped, its timer is cancelled if it was running, and its
|
||||||
|
* trustlevel is copied to TRUSTLEVEL(client).
|
||||||
|
*
|
||||||
|
* If a client is disconnecting and the client was using a generated
|
||||||
|
* authorization, the authorization's reference count is decremented, and
|
||||||
|
* if it is now zero, the timer for this authorization is started.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
XaceClientStateCallback(
|
||||||
|
CallbackListPtr *pcbl,
|
||||||
|
pointer nulldata,
|
||||||
|
pointer calldata)
|
||||||
|
{
|
||||||
|
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
|
||||||
|
ClientPtr client = pci->client;
|
||||||
|
|
||||||
|
switch (client->clientState)
|
||||||
|
{
|
||||||
|
case ClientStateRunning:
|
||||||
|
{
|
||||||
|
client->requestVector = client->swapped ?
|
||||||
|
SwappedUntrustedProcVector : UntrustedProcVector;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
} /* XaceClientStateCallback */
|
||||||
|
|
||||||
|
/* XaceExtensionInit
|
||||||
|
*
|
||||||
|
* Initialize the XACE Extension
|
||||||
|
*/
|
||||||
|
void XaceExtensionInit(INITARGS)
|
||||||
|
{
|
||||||
|
ExtensionEntry *extEntry;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!AddCallback(&ClientStateCallback, XaceClientStateCallback, NULL))
|
||||||
|
return;
|
||||||
|
|
||||||
|
extEntry = AddExtension(XACE_EXTENSION_NAME,
|
||||||
|
XaceNumberEvents, XaceNumberErrors,
|
||||||
|
ProcXaceDispatch, SProcXaceDispatch,
|
||||||
|
XaceResetProc, StandardMinorOpcode);
|
||||||
|
|
||||||
|
/* initialize dispatching intercept functions */
|
||||||
|
for (i = 0; i < 128; i++)
|
||||||
|
{
|
||||||
|
UntrustedProcVector[i] = XaceCatchDispatchProc;
|
||||||
|
SwappedUntrustedProcVector[i] = XaceCatchDispatchProc;
|
||||||
|
}
|
||||||
|
for (i = 128; i < 256; i++)
|
||||||
|
{
|
||||||
|
UntrustedProcVector[i] = XaceCatchExtProc;
|
||||||
|
SwappedUntrustedProcVector[i] = XaceCatchExtProc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* XaceCensorImage
|
||||||
|
*
|
||||||
|
* Called after pScreen->GetImage to prevent pieces or trusted windows from
|
||||||
|
* being returned in image data from an untrusted window.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* client is the client doing the GetImage.
|
||||||
|
* pVisibleRegion is the visible region of the window.
|
||||||
|
* widthBytesLine is the width in bytes of one horizontal line in pBuf.
|
||||||
|
* pDraw is the source window.
|
||||||
|
* x, y, w, h is the rectangle of image data from pDraw in pBuf.
|
||||||
|
* format is the format of the image data in pBuf: ZPixmap or XYPixmap.
|
||||||
|
* pBuf is the image data.
|
||||||
|
*
|
||||||
|
* Returns: nothing.
|
||||||
|
*
|
||||||
|
* Side Effects:
|
||||||
|
* Any part of the rectangle (x, y, w, h) that is outside the visible
|
||||||
|
* region of the window will be destroyed (overwritten) in pBuf.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
|
||||||
|
format, pBuf)
|
||||||
|
ClientPtr client;
|
||||||
|
RegionPtr pVisibleRegion;
|
||||||
|
long widthBytesLine;
|
||||||
|
DrawablePtr pDraw;
|
||||||
|
int x, y, w, h;
|
||||||
|
unsigned int format;
|
||||||
|
char * pBuf;
|
||||||
|
{
|
||||||
|
ScreenPtr pScreen = pDraw->pScreen;
|
||||||
|
RegionRec imageRegion; /* region representing x,y,w,h */
|
||||||
|
RegionRec censorRegion; /* region to obliterate */
|
||||||
|
BoxRec imageBox;
|
||||||
|
int nRects;
|
||||||
|
|
||||||
|
imageBox.x1 = x;
|
||||||
|
imageBox.y1 = y;
|
||||||
|
imageBox.x2 = x + w;
|
||||||
|
imageBox.y2 = y + h;
|
||||||
|
REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
|
||||||
|
REGION_NULL(pScreen, &censorRegion);
|
||||||
|
|
||||||
|
/* censorRegion = imageRegion - visibleRegion */
|
||||||
|
REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
|
||||||
|
nRects = REGION_NUM_RECTS(&censorRegion);
|
||||||
|
if (nRects > 0)
|
||||||
|
{ /* we have something to censor */
|
||||||
|
GCPtr pScratchGC = NULL;
|
||||||
|
PixmapPtr pPix = NULL;
|
||||||
|
xRectangle *pRects = NULL;
|
||||||
|
Bool failed = FALSE;
|
||||||
|
int depth = 1;
|
||||||
|
int bitsPerPixel = 1;
|
||||||
|
int i;
|
||||||
|
BoxPtr pBox;
|
||||||
|
|
||||||
|
/* convert region to list-of-rectangles for PolyFillRect */
|
||||||
|
|
||||||
|
pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *));
|
||||||
|
if (!pRects)
|
||||||
|
{
|
||||||
|
failed = TRUE;
|
||||||
|
goto failSafe;
|
||||||
|
}
|
||||||
|
for (pBox = REGION_RECTS(&censorRegion), i = 0;
|
||||||
|
i < nRects;
|
||||||
|
i++, pBox++)
|
||||||
|
{
|
||||||
|
pRects[i].x = pBox->x1;
|
||||||
|
pRects[i].y = pBox->y1 - imageBox.y1;
|
||||||
|
pRects[i].width = pBox->x2 - pBox->x1;
|
||||||
|
pRects[i].height = pBox->y2 - pBox->y1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* use pBuf as a fake pixmap */
|
||||||
|
|
||||||
|
if (format == ZPixmap)
|
||||||
|
{
|
||||||
|
depth = pDraw->depth;
|
||||||
|
bitsPerPixel = pDraw->bitsPerPixel;
|
||||||
|
}
|
||||||
|
|
||||||
|
pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h,
|
||||||
|
depth, bitsPerPixel,
|
||||||
|
widthBytesLine, (pointer)pBuf);
|
||||||
|
if (!pPix)
|
||||||
|
{
|
||||||
|
failed = TRUE;
|
||||||
|
goto failSafe;
|
||||||
|
}
|
||||||
|
|
||||||
|
pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen);
|
||||||
|
if (!pScratchGC)
|
||||||
|
{
|
||||||
|
failed = TRUE;
|
||||||
|
goto failSafe;
|
||||||
|
}
|
||||||
|
|
||||||
|
ValidateGC(&pPix->drawable, pScratchGC);
|
||||||
|
(* pScratchGC->ops->PolyFillRect)(&pPix->drawable,
|
||||||
|
pScratchGC, nRects, pRects);
|
||||||
|
|
||||||
|
failSafe:
|
||||||
|
if (failed)
|
||||||
|
{
|
||||||
|
/* Censoring was not completed above. To be safe, wipe out
|
||||||
|
* all the image data so that nothing trusted gets out.
|
||||||
|
*/
|
||||||
|
bzero(pBuf, (int)(widthBytesLine * h));
|
||||||
|
}
|
||||||
|
if (pRects) DEALLOCATE_LOCAL(pRects);
|
||||||
|
if (pScratchGC) FreeScratchGC(pScratchGC);
|
||||||
|
if (pPix) FreeScratchPixmapHeader(pPix);
|
||||||
|
}
|
||||||
|
REGION_UNINIT(pScreen, &imageRegion);
|
||||||
|
REGION_UNINIT(pScreen, &censorRegion);
|
||||||
|
} /* XaceCensorImage */
|
|
@ -0,0 +1,103 @@
|
||||||
|
/************************************************************
|
||||||
|
|
||||||
|
Author: Eamon Walsh <ewalsh@epoch.ncsc.mil>
|
||||||
|
|
||||||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
this permission notice appear in supporting documentation. This permission
|
||||||
|
notice shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
********************************************************/
|
||||||
|
|
||||||
|
#ifndef _XACE_H
|
||||||
|
#define _XACE_H
|
||||||
|
|
||||||
|
#define XACE_EXTENSION_NAME "XAccessControlExtension"
|
||||||
|
#define XACE_MAJOR_VERSION 1
|
||||||
|
#define XACE_MINOR_VERSION 0
|
||||||
|
|
||||||
|
#include "pixmap.h" /* for DrawablePtr */
|
||||||
|
#include "regionstr.h" /* for RegionPtr */
|
||||||
|
|
||||||
|
#define XaceNumberEvents 0
|
||||||
|
#define XaceNumberErrors 0
|
||||||
|
|
||||||
|
/* security hooks */
|
||||||
|
/* Constants used to identify the available security hooks
|
||||||
|
*/
|
||||||
|
#define XACE_CORE_DISPATCH 0
|
||||||
|
#define XACE_EXT_DISPATCH 1
|
||||||
|
#define XACE_RESOURCE_ACCESS 2
|
||||||
|
#define XACE_DEVICE_ACCESS 3
|
||||||
|
#define XACE_PROPERTY_ACCESS 4
|
||||||
|
#define XACE_DRAWABLE_ACCESS 5
|
||||||
|
#define XACE_MAP_ACCESS 6
|
||||||
|
#define XACE_BACKGRND_ACCESS 7
|
||||||
|
#define XACE_EXT_ACCESS 8
|
||||||
|
#define XACE_HOSTLIST_ACCESS 9
|
||||||
|
#define XACE_SITE_POLICY 10
|
||||||
|
#define XACE_DECLARE_EXT_SECURE 11
|
||||||
|
#define XACE_AUTH_AVAIL 12
|
||||||
|
#define XACE_KEY_AVAIL 13
|
||||||
|
#define XACE_WINDOW_INIT 14
|
||||||
|
#define XACE_AUDIT_BEGIN 15
|
||||||
|
#define XACE_AUDIT_END 16
|
||||||
|
#define XACE_NUM_HOOKS 17
|
||||||
|
|
||||||
|
extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
|
||||||
|
|
||||||
|
/* Entry point for hook functions. Called by Xserver.
|
||||||
|
*/
|
||||||
|
extern int XaceHook(
|
||||||
|
int /*hook*/,
|
||||||
|
... /*appropriate args for hook*/
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Register a callback for a given hook.
|
||||||
|
*/
|
||||||
|
#define XaceRegisterCallback(hook,callback,data) \
|
||||||
|
AddCallback(XaceHooks+(hook), callback, data)
|
||||||
|
|
||||||
|
/* Unregister an existing callback for a given hook.
|
||||||
|
*/
|
||||||
|
#define XaceDeleteCallback(hook,callback,data) \
|
||||||
|
DeleteCallback(XaceHooks+(hook), callback, data)
|
||||||
|
|
||||||
|
|
||||||
|
/* From the original Security extension...
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Hook return codes */
|
||||||
|
#define SecurityAllowOperation 0
|
||||||
|
#define SecurityIgnoreOperation 1
|
||||||
|
#define SecurityErrorOperation 2
|
||||||
|
|
||||||
|
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||||
|
* These are the same as the normal proc vectors except that extensions
|
||||||
|
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||||
|
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||||
|
* from guessing extension major opcodes and using the extension even though
|
||||||
|
* the extension can't be listed or queried.
|
||||||
|
*/
|
||||||
|
extern int (*UntrustedProcVector[256])(ClientPtr client);
|
||||||
|
extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
|
||||||
|
|
||||||
|
extern void XaceCensorImage(
|
||||||
|
ClientPtr client,
|
||||||
|
RegionPtr pVisibleRegion,
|
||||||
|
long widthBytesLine,
|
||||||
|
DrawablePtr pDraw,
|
||||||
|
int x, int y, int w, int h,
|
||||||
|
unsigned int format,
|
||||||
|
char * pBuf
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif /* _XACE_H */
|
|
@ -0,0 +1,135 @@
|
||||||
|
/************************************************************
|
||||||
|
|
||||||
|
Author: Eamon Walsh <ewalsh@epoch.ncsc.mil>
|
||||||
|
|
||||||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
this permission notice appear in supporting documentation. This permission
|
||||||
|
notice shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
********************************************************/
|
||||||
|
|
||||||
|
#ifndef _XACESTR_H
|
||||||
|
#define _XACESTR_H
|
||||||
|
|
||||||
|
#include <X11/Xdefs.h>
|
||||||
|
#include "dixstruct.h"
|
||||||
|
#include "resource.h"
|
||||||
|
#include "extnsionst.h"
|
||||||
|
#include "gcstruct.h"
|
||||||
|
#include "windowstr.h"
|
||||||
|
#include "inputstr.h"
|
||||||
|
#include "xace.h"
|
||||||
|
|
||||||
|
/* XACE_CORE_DISPATCH */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
int rval;
|
||||||
|
} XaceCoreDispatchRec;
|
||||||
|
|
||||||
|
/* XACE_RESOURCE_ACCESS */
|
||||||
|
/* XACE_RESOURCE_CREATE */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
XID id;
|
||||||
|
RESTYPE rtype;
|
||||||
|
Mask access_mode;
|
||||||
|
pointer res;
|
||||||
|
int rval;
|
||||||
|
} XaceResourceAccessRec;
|
||||||
|
|
||||||
|
/* XACE_DEVICE_ACCESS */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
DeviceIntPtr dev;
|
||||||
|
Bool fromRequest;
|
||||||
|
int rval;
|
||||||
|
} XaceDeviceAccessRec;
|
||||||
|
|
||||||
|
/* XACE_PROPERTY_ACCESS */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
WindowPtr pWin;
|
||||||
|
Atom propertyName;
|
||||||
|
Mask access_mode;
|
||||||
|
int rval;
|
||||||
|
} XacePropertyAccessRec;
|
||||||
|
|
||||||
|
/* XACE_DRAWABLE_ACCESS */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
DrawablePtr pDraw;
|
||||||
|
int rval;
|
||||||
|
} XaceDrawableAccessRec;
|
||||||
|
|
||||||
|
/* XACE_MAP_ACCESS */
|
||||||
|
/* XACE_BACKGRND_ACCESS */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
WindowPtr pWin;
|
||||||
|
int rval;
|
||||||
|
} XaceMapAccessRec;
|
||||||
|
|
||||||
|
/* XACE_EXT_DISPATCH_ACCESS */
|
||||||
|
/* XACE_EXT_ACCESS */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
ExtensionEntry *ext;
|
||||||
|
int rval;
|
||||||
|
} XaceExtAccessRec;
|
||||||
|
|
||||||
|
/* XACE_HOSTLIST_ACCESS */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
Mask access_mode;
|
||||||
|
int rval;
|
||||||
|
} XaceHostlistAccessRec;
|
||||||
|
|
||||||
|
/* XACE_SITE_POLICY */
|
||||||
|
typedef struct {
|
||||||
|
char *policyString;
|
||||||
|
int len;
|
||||||
|
int rval;
|
||||||
|
} XaceSitePolicyRec;
|
||||||
|
|
||||||
|
/* XACE_DECLARE_EXT_SECURE */
|
||||||
|
typedef struct {
|
||||||
|
ExtensionEntry *ext;
|
||||||
|
Bool secure;
|
||||||
|
} XaceDeclareExtSecureRec;
|
||||||
|
|
||||||
|
/* XACE_AUTH_AVAIL */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
XID authId;
|
||||||
|
} XaceAuthAvailRec;
|
||||||
|
|
||||||
|
/* XACE_KEY_AVAIL */
|
||||||
|
typedef struct {
|
||||||
|
xEventPtr event;
|
||||||
|
DeviceIntPtr keybd;
|
||||||
|
int count;
|
||||||
|
} XaceKeyAvailRec;
|
||||||
|
|
||||||
|
/* XACE_WINDOW_INIT */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
WindowPtr pWin;
|
||||||
|
} XaceWindowRec;
|
||||||
|
|
||||||
|
/* XACE_AUDIT_BEGIN */
|
||||||
|
/* XACE_AUDIT_END */
|
||||||
|
typedef struct {
|
||||||
|
ClientPtr client;
|
||||||
|
int requestResult;
|
||||||
|
} XaceAuditRec;
|
||||||
|
|
||||||
|
#endif /* _XACESTR_H */
|
|
@ -301,7 +301,7 @@ typedef unsigned int *glyphPointer;
|
||||||
#define StorePixels(o,p) dst[o] = p
|
#define StorePixels(o,p) dst[o] = p
|
||||||
#define Loop dst += widthDst;
|
#define Loop dst += widthDst;
|
||||||
#else
|
#else
|
||||||
#define StorePixels(o,p) *dst++ = (p)
|
#define StorePixels(o,p) do { *dst = (p); dst++; } while (0)
|
||||||
#define Loop dst += widthLeft;
|
#define Loop dst += widthLeft;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
35
configure.ac
35
configure.ac
|
@ -82,7 +82,8 @@ AC_TYPE_PID_T
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
|
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
|
||||||
strtol getopt getopt_long vsnprintf walkcontext backtrace])
|
strtol getopt getopt_long vsnprintf walkcontext backtrace \
|
||||||
|
getisax])
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
dnl Old HAS_* names used in os/*.c.
|
dnl Old HAS_* names used in os/*.c.
|
||||||
AC_CHECK_FUNC([getdtablesize],
|
AC_CHECK_FUNC([getdtablesize],
|
||||||
|
@ -413,11 +414,12 @@ AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extensio
|
||||||
AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
|
AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
|
||||||
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
|
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
|
||||||
AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
|
AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
|
||||||
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes])
|
AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
|
||||||
|
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE])
|
||||||
|
AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY])
|
||||||
AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
|
AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
|
||||||
AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
|
AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
|
||||||
AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
|
AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
|
||||||
AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes])
|
|
||||||
AC_ARG_ENABLE(cup, AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes])
|
AC_ARG_ENABLE(cup, AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes])
|
||||||
AC_ARG_ENABLE(evi, AS_HELP_STRING([--disable-evi], [Build Extended-Visual-Information extension (default: enabled)]), [EVI=$enableval], [EVI=yes])
|
AC_ARG_ENABLE(evi, AS_HELP_STRING([--disable-evi], [Build Extended-Visual-Information extension (default: enabled)]), [EVI=$enableval], [EVI=yes])
|
||||||
AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
|
AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
|
||||||
|
@ -581,7 +583,12 @@ if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then
|
||||||
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
|
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
|
||||||
GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la'
|
GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la'
|
||||||
test -d GL || mkdir GL
|
test -d GL || mkdir GL
|
||||||
$srcdir/GL/symlink-mesa.sh $MESA_SOURCE GL/
|
case $host_os in
|
||||||
|
solaris*)
|
||||||
|
SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh" ;;
|
||||||
|
*) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;;
|
||||||
|
esac
|
||||||
|
$SYMLINK_MESA $MESA_SOURCE GL/
|
||||||
if test $? -ne 0; then
|
if test $? -ne 0; then
|
||||||
AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.])
|
AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.])
|
||||||
fi
|
fi
|
||||||
|
@ -622,8 +629,16 @@ if test "x$XINERAMA" = xyes; then
|
||||||
REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto"
|
REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
|
||||||
|
if test "x$XACE" = xyes; then
|
||||||
|
AC_DEFINE(XACE, 1, [Build X-ACE extension])
|
||||||
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes])
|
AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes])
|
||||||
if test "x$XCSECURITY" = xyes; then
|
if test "x$XCSECURITY" = xyes; then
|
||||||
|
if test "x$XACE" != xyes; then
|
||||||
|
AC_MSG_ERROR([cannot build Security extension without X-ACE])
|
||||||
|
fi
|
||||||
AC_DEFINE(XCSECURITY, 1, [Build Security extension])
|
AC_DEFINE(XCSECURITY, 1, [Build Security extension])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -633,12 +648,11 @@ if test "x$XEVIE" = xyes; then
|
||||||
REQUIRED_MODULES="$REQUIRED_MODULES evieproto"
|
REQUIRED_MODULES="$REQUIRED_MODULES evieproto"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$APPGROUP" = xyes && test "x$XCSECURITY" != xyes; then
|
|
||||||
AC_MSG_NOTICE([Disabling APPGROUP extension])
|
|
||||||
APPGROUP=no
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(APPGROUP, [test "x$APPGROUP" = xyes])
|
AM_CONDITIONAL(APPGROUP, [test "x$APPGROUP" = xyes])
|
||||||
if test "x$APPGROUP" = xyes; then
|
if test "x$APPGROUP" = xyes; then
|
||||||
|
if test "x$XACE" != xyes || test "x$XCSECURITY" != xyes; then
|
||||||
|
AC_MSG_ERROR([cannot build APPGROUP extension without X-ACE and XC-SECURITY])
|
||||||
|
fi
|
||||||
AC_DEFINE(XAPPGROUP, 1, [Build APPGROUP extension])
|
AC_DEFINE(XAPPGROUP, 1, [Build APPGROUP extension])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -807,6 +821,7 @@ VENDOR_MAN_VERSION="Version ${VENDOR_VERSION_STRING}"
|
||||||
|
|
||||||
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
|
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
|
||||||
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
|
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
|
||||||
|
AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
|
||||||
AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
|
AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
|
||||||
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
|
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
|
||||||
AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_STRING_SHORT"], [Short vendor name])
|
AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_STRING_SHORT"], [Short vendor name])
|
||||||
|
@ -1566,8 +1581,8 @@ AC_SUBST(XORGCONFIG_DEP_LIBS)
|
||||||
|
|
||||||
dnl xorgcfg GUI configuration utility
|
dnl xorgcfg GUI configuration utility
|
||||||
AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
|
AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
|
||||||
[Build xorgcfg GUI configuration utility (default: yes)]),
|
[Build xorgcfg GUI configuration utility (default: no)]),
|
||||||
[XORGCFG=$enableval],[XORGCFG=yes])
|
[XORGCFG=$enableval],[XORGCFG=no])
|
||||||
if test x$XORGCFG = xyes ; then
|
if test x$XORGCFG = xyes ; then
|
||||||
PKG_CHECK_MODULES([XORGCFG_DEP],
|
PKG_CHECK_MODULES([XORGCFG_DEP],
|
||||||
[xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
|
[xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
|
||||||
|
|
|
@ -69,8 +69,8 @@ SOFTWARE.
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
#include <X11/extensions/XKBsrv.h>
|
#include <X11/extensions/XKBsrv.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
|
@ -946,8 +946,8 @@ ProcSetModifierMapping(ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (!SecurityCheckDeviceAccess(client, keybd, TRUE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, keybd, TRUE))
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1063,9 +1063,8 @@ ProcChangeKeyboardMapping(ClientPtr client)
|
||||||
client->errorValue = stuff->keySymsPerKeyCode;
|
client->errorValue = stuff->keySymsPerKeyCode;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard,
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||||
TRUE))
|
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
#endif
|
#endif
|
||||||
keysyms.minKeyCode = stuff->firstKeyCode;
|
keysyms.minKeyCode = stuff->firstKeyCode;
|
||||||
|
@ -1211,8 +1210,8 @@ ProcChangeKeyboardControl (ClientPtr client)
|
||||||
vmask = stuff->mask;
|
vmask = stuff->mask;
|
||||||
if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask))
|
if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (!SecurityCheckDeviceAccess(client, keybd, TRUE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, keybd, TRUE))
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
#endif
|
#endif
|
||||||
vlist = (XID *)&stuff[1]; /* first word of values */
|
vlist = (XID *)&stuff[1]; /* first word of values */
|
||||||
|
@ -1600,8 +1599,8 @@ ProcQueryKeymap(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 2;
|
rep.length = 2;
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||||
{
|
{
|
||||||
bzero((char *)&rep.map[0], 32);
|
bzero((char *)&rep.map[0], 32);
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,8 +104,8 @@ int ProcInitialConnection();
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
#include "appgroup.h"
|
#include "appgroup.h"
|
||||||
|
@ -451,7 +451,15 @@ Dispatch(void)
|
||||||
if (result > (maxBigRequestSize << 2))
|
if (result > (maxBigRequestSize << 2))
|
||||||
result = BadLength;
|
result = BadLength;
|
||||||
else
|
else
|
||||||
|
#ifdef XACE
|
||||||
|
{
|
||||||
|
XaceHook(XACE_AUDIT_BEGIN, client);
|
||||||
result = (* client->requestVector[MAJOROP])(client);
|
result = (* client->requestVector[MAJOROP])(client);
|
||||||
|
XaceHook(XACE_AUDIT_END, client, result);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
result = (* client->requestVector[MAJOROP])(client);
|
||||||
|
#endif /* XACE */
|
||||||
|
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
{
|
{
|
||||||
|
@ -1099,11 +1107,10 @@ ProcConvertSelection(register ClientPtr client)
|
||||||
CurrentSelections[i].selection != stuff->selection) i++;
|
CurrentSelections[i].selection != stuff->selection) i++;
|
||||||
if ((i < NumCurrentSelections) &&
|
if ((i < NumCurrentSelections) &&
|
||||||
(CurrentSelections[i].window != None)
|
(CurrentSelections[i].window != None)
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
&& (!client->CheckAccess ||
|
&& XaceHook(XACE_RESOURCE_ACCESS, client,
|
||||||
(* client->CheckAccess)(client, CurrentSelections[i].window,
|
CurrentSelections[i].window, RT_WINDOW,
|
||||||
RT_WINDOW, SecurityReadAccess,
|
SecurityReadAccess, CurrentSelections[i].pWin)
|
||||||
CurrentSelections[i].pWin))
|
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -2095,7 +2102,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||||
Mask plane = 0;
|
Mask plane = 0;
|
||||||
char *pBuf;
|
char *pBuf;
|
||||||
xGetImageReply xgi;
|
xGetImageReply xgi;
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
RegionPtr pVisibleRegion = NULL;
|
RegionPtr pVisibleRegion = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2201,9 +2208,9 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||||
WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
|
WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (client->trustLevel != XSecurityClientTrusted &&
|
if (pDraw->type == DRAWABLE_WINDOW &&
|
||||||
pDraw->type == DRAWABLE_WINDOW)
|
!XaceHook(XACE_DRAWABLE_ACCESS, client, pDraw))
|
||||||
{
|
{
|
||||||
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
|
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
|
||||||
if (pVisibleRegion)
|
if (pVisibleRegion)
|
||||||
|
@ -2231,9 +2238,9 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||||
format,
|
format,
|
||||||
planemask,
|
planemask,
|
||||||
(pointer) pBuf);
|
(pointer) pBuf);
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (pVisibleRegion)
|
if (pVisibleRegion)
|
||||||
SecurityCensorImage(client, pVisibleRegion, widthBytesLine,
|
XaceCensorImage(client, pVisibleRegion, widthBytesLine,
|
||||||
pDraw, x, y + linesDone, width,
|
pDraw, x, y + linesDone, width,
|
||||||
nlines, format, pBuf);
|
nlines, format, pBuf);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2272,9 +2279,9 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||||
format,
|
format,
|
||||||
plane,
|
plane,
|
||||||
(pointer)pBuf);
|
(pointer)pBuf);
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (pVisibleRegion)
|
if (pVisibleRegion)
|
||||||
SecurityCensorImage(client, pVisibleRegion,
|
XaceCensorImage(client, pVisibleRegion,
|
||||||
widthBytesLine,
|
widthBytesLine,
|
||||||
pDraw, x, y + linesDone, width,
|
pDraw, x, y + linesDone, width,
|
||||||
nlines, format, pBuf);
|
nlines, format, pBuf);
|
||||||
|
@ -2300,7 +2307,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (pVisibleRegion)
|
if (pVisibleRegion)
|
||||||
REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
|
REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
|
||||||
#endif
|
#endif
|
||||||
|
@ -3274,11 +3281,10 @@ ProcListHosts(register ClientPtr client)
|
||||||
/* REQUEST(xListHostsReq); */
|
/* REQUEST(xListHostsReq); */
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xListHostsReq);
|
REQUEST_SIZE_MATCH(xListHostsReq);
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
/* untrusted clients can't list hosts */
|
/* untrusted clients can't list hosts */
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
if (!XaceHook(XACE_HOSTLIST_ACCESS, client, SecurityReadAccess))
|
||||||
{
|
{
|
||||||
SecurityAudit("client %d attempted to list hosts\n", client->index);
|
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3606,8 +3612,13 @@ CloseDownRetainedResources()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern int clientPrivateLen;
|
||||||
|
extern unsigned *clientPrivateSizes;
|
||||||
|
extern unsigned totalClientSize;
|
||||||
|
|
||||||
void InitClient(ClientPtr client, int i, pointer ospriv)
|
void InitClient(ClientPtr client, int i, pointer ospriv)
|
||||||
{
|
{
|
||||||
|
bzero(client, totalClientSize);
|
||||||
client->index = i;
|
client->index = i;
|
||||||
client->sequence = 0;
|
client->sequence = 0;
|
||||||
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
|
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
|
||||||
|
@ -3646,11 +3657,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
client->replyBytesRemaining = 0;
|
client->replyBytesRemaining = 0;
|
||||||
#ifdef XCSECURITY
|
|
||||||
client->trustLevel = XSecurityClientTrusted;
|
|
||||||
client->CheckAccess = NULL;
|
|
||||||
client->authId = 0;
|
|
||||||
#endif
|
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
client->appgroup = NULL;
|
client->appgroup = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3663,10 +3669,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int clientPrivateLen;
|
|
||||||
extern unsigned *clientPrivateSizes;
|
|
||||||
extern unsigned totalClientSize;
|
|
||||||
|
|
||||||
int
|
int
|
||||||
InitClientPrivates(ClientPtr client)
|
InitClientPrivates(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -3699,6 +3701,17 @@ InitClientPrivates(ClientPtr client)
|
||||||
else
|
else
|
||||||
ppriv->ptr = (pointer)NULL;
|
ppriv->ptr = (pointer)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Allow registrants to initialize the serverClient devPrivates */
|
||||||
|
if (!client->index && ClientStateCallback)
|
||||||
|
{
|
||||||
|
NewClientInfoRec clientinfo;
|
||||||
|
|
||||||
|
clientinfo.client = client;
|
||||||
|
clientinfo.prefix = (xConnSetupPrefix *)NULL;
|
||||||
|
clientinfo.setup = (xConnSetup *) NULL;
|
||||||
|
CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,8 @@ Author: Adobe Systems Incorporated
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#define XK_LATIN1
|
#define XK_LATIN1
|
||||||
#include <X11/keysymdef.h>
|
#include <X11/keysymdef.h>
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -196,7 +196,7 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len,
|
||||||
return (int) c1 - (int) c2;
|
return (int) c1 - (int) c2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
|
|
||||||
/* SecurityLookupWindow and SecurityLookupDrawable:
|
/* SecurityLookupWindow and SecurityLookupDrawable:
|
||||||
* Look up the window/drawable taking into account the client doing
|
* Look up the window/drawable taking into account the client doing
|
||||||
|
@ -204,32 +204,16 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len,
|
||||||
* if it exists and the client is allowed access, else return NULL.
|
* if it exists and the client is allowed access, else return NULL.
|
||||||
* Most Proc* functions should be calling these instead of
|
* Most Proc* functions should be calling these instead of
|
||||||
* LookupWindow and LookupDrawable, which do no access checks.
|
* LookupWindow and LookupDrawable, which do no access checks.
|
||||||
|
* XACE note: need to see if client->lastDrawableID can still be used here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT WindowPtr
|
_X_EXPORT WindowPtr
|
||||||
SecurityLookupWindow(XID rid, ClientPtr client, Mask access_mode)
|
SecurityLookupWindow(XID rid, ClientPtr client, Mask access_mode)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
|
||||||
|
|
||||||
client->errorValue = rid;
|
client->errorValue = rid;
|
||||||
if(rid == INVALID)
|
if(rid == INVALID)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
|
||||||
return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
|
return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
|
||||||
if (client->lastDrawableID == rid)
|
|
||||||
{
|
|
||||||
if (client->lastDrawable->type == DRAWABLE_WINDOW)
|
|
||||||
return ((WindowPtr) client->lastDrawable);
|
|
||||||
return (WindowPtr) NULL;
|
|
||||||
}
|
|
||||||
pWin = (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
|
|
||||||
if (pWin && pWin->drawable.type == DRAWABLE_WINDOW) {
|
|
||||||
client->lastDrawable = (DrawablePtr) pWin;
|
|
||||||
client->lastDrawableID = rid;
|
|
||||||
client->lastGCID = INVALID;
|
|
||||||
client->lastGC = (GCPtr)NULL;
|
|
||||||
}
|
|
||||||
return pWin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -240,11 +224,6 @@ SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode)
|
||||||
|
|
||||||
if(rid == INVALID)
|
if(rid == INVALID)
|
||||||
return (pointer) NULL;
|
return (pointer) NULL;
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
|
||||||
return (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
|
|
||||||
access_mode);
|
|
||||||
if (client->lastDrawableID == rid)
|
|
||||||
return ((pointer) client->lastDrawable);
|
|
||||||
pDraw = (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
|
pDraw = (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
|
||||||
access_mode);
|
access_mode);
|
||||||
if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW))
|
if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW))
|
||||||
|
@ -268,7 +247,7 @@ LookupDrawable(XID rid, ClientPtr client)
|
||||||
return SecurityLookupDrawable(rid, client, SecurityUnknownAccess);
|
return SecurityLookupDrawable(rid, client, SecurityUnknownAccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* not XCSECURITY */
|
#else /* not XACE */
|
||||||
|
|
||||||
WindowPtr
|
WindowPtr
|
||||||
LookupWindow(XID rid, ClientPtr client)
|
LookupWindow(XID rid, ClientPtr client)
|
||||||
|
@ -310,7 +289,7 @@ LookupDrawable(XID rid, ClientPtr client)
|
||||||
return (pointer)NULL;
|
return (pointer)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* XCSECURITY */
|
#endif /* XACE */
|
||||||
|
|
||||||
_X_EXPORT ClientPtr
|
_X_EXPORT ClientPtr
|
||||||
LookupClient(XID rid, ClientPtr client)
|
LookupClient(XID rid, ClientPtr client)
|
||||||
|
|
28
dix/events.c
28
dix/events.c
|
@ -135,8 +135,8 @@ of the copyright holder.
|
||||||
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
|
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XEVIE
|
#ifdef XEVIE
|
||||||
|
@ -2476,8 +2476,8 @@ CheckPassiveGrabsOnWindow(
|
||||||
(grab->confineTo->realized &&
|
(grab->confineTo->realized &&
|
||||||
BorderSizeNotEmpty(grab->confineTo))))
|
BorderSizeNotEmpty(grab->confineTo))))
|
||||||
{
|
{
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (!SecurityCheckDeviceAccess(wClient(pWin), device, FALSE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
|
@ -2846,6 +2846,10 @@ drawable.id:0;
|
||||||
DeliverFocusedEvent(keybd, xE, sprite.win, count);
|
DeliverFocusedEvent(keybd, xE, sprite.win, count);
|
||||||
if (deactivateGrab)
|
if (deactivateGrab)
|
||||||
(*keybd->DeactivateGrab)(keybd);
|
(*keybd->DeactivateGrab)(keybd);
|
||||||
|
|
||||||
|
#ifdef XACE
|
||||||
|
XaceHook(XACE_KEY_AVAIL, xE, keybd, count);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
|
@ -3279,10 +3283,10 @@ EnterLeaveEvent(
|
||||||
{
|
{
|
||||||
xKeymapEvent ke;
|
xKeymapEvent ke;
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
ClientPtr client = grab ? rClient(grab)
|
ClientPtr client = grab ? rClient(grab)
|
||||||
: clients[CLIENT_ID(pWin->drawable.id)];
|
: clients[CLIENT_ID(pWin->drawable.id)];
|
||||||
if (!SecurityCheckDeviceAccess(client, keybd, FALSE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE))
|
||||||
{
|
{
|
||||||
bzero((char *)&ke.map[0], 31);
|
bzero((char *)&ke.map[0], 31);
|
||||||
}
|
}
|
||||||
|
@ -3374,9 +3378,9 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr
|
||||||
((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask))
|
((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask))
|
||||||
{
|
{
|
||||||
xKeymapEvent ke;
|
xKeymapEvent ke;
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)];
|
ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)];
|
||||||
if (!SecurityCheckDeviceAccess(client, dev, FALSE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE))
|
||||||
{
|
{
|
||||||
bzero((char *)&ke.map[0], 31);
|
bzero((char *)&ke.map[0], 31);
|
||||||
}
|
}
|
||||||
|
@ -3645,8 +3649,8 @@ ProcSetInputFocus(client)
|
||||||
REQUEST(xSetInputFocusReq);
|
REQUEST(xSetInputFocusReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xSetInputFocusReq);
|
REQUEST_SIZE_MATCH(xSetInputFocusReq);
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||||
return Success;
|
return Success;
|
||||||
#endif
|
#endif
|
||||||
return SetInputFocus(client, inputInfo.keyboard, stuff->focus,
|
return SetInputFocus(client, inputInfo.keyboard, stuff->focus,
|
||||||
|
@ -3910,8 +3914,8 @@ ProcGrabKeyboard(ClientPtr client)
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
|
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
|
if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
|
||||||
{
|
{
|
||||||
result = Success;
|
result = Success;
|
||||||
rep.status = AlreadyGrabbed;
|
rep.status = AlreadyGrabbed;
|
||||||
|
|
|
@ -59,8 +59,8 @@ SOFTWARE.
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EXTENSION_BASE 128
|
#define EXTENSION_BASE 128
|
||||||
|
@ -76,6 +76,39 @@ int lastEvent = EXTENSION_EVENT_BASE;
|
||||||
static int lastError = FirstExtensionError;
|
static int lastError = FirstExtensionError;
|
||||||
static unsigned int NumExtensions = 0;
|
static unsigned int NumExtensions = 0;
|
||||||
|
|
||||||
|
extern int extensionPrivateLen;
|
||||||
|
extern unsigned *extensionPrivateSizes;
|
||||||
|
extern unsigned totalExtensionSize;
|
||||||
|
|
||||||
|
static void
|
||||||
|
InitExtensionPrivates(ExtensionEntry *ext)
|
||||||
|
{
|
||||||
|
register char *ptr;
|
||||||
|
DevUnion *ppriv;
|
||||||
|
register unsigned *sizes;
|
||||||
|
register unsigned size;
|
||||||
|
register int i;
|
||||||
|
|
||||||
|
if (totalExtensionSize == sizeof(ExtensionEntry))
|
||||||
|
ppriv = (DevUnion *)NULL;
|
||||||
|
else
|
||||||
|
ppriv = (DevUnion *)(ext + 1);
|
||||||
|
|
||||||
|
ext->devPrivates = ppriv;
|
||||||
|
sizes = extensionPrivateSizes;
|
||||||
|
ptr = (char *)(ppriv + extensionPrivateLen);
|
||||||
|
for (i = extensionPrivateLen; --i >= 0; ppriv++, sizes++)
|
||||||
|
{
|
||||||
|
if ( (size = *sizes) )
|
||||||
|
{
|
||||||
|
ppriv->ptr = (pointer)ptr;
|
||||||
|
ptr += size;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ppriv->ptr = (pointer)NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_X_EXPORT ExtensionEntry *
|
_X_EXPORT ExtensionEntry *
|
||||||
AddExtension(char *name, int NumEvents, int NumErrors,
|
AddExtension(char *name, int NumEvents, int NumErrors,
|
||||||
int (*MainProc)(ClientPtr c1),
|
int (*MainProc)(ClientPtr c1),
|
||||||
|
@ -92,9 +125,11 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
||||||
(unsigned)(lastError + NumErrors > LAST_ERROR))
|
(unsigned)(lastError + NumErrors > LAST_ERROR))
|
||||||
return((ExtensionEntry *) NULL);
|
return((ExtensionEntry *) NULL);
|
||||||
|
|
||||||
ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry));
|
ext = (ExtensionEntry *) xalloc(totalExtensionSize);
|
||||||
if (!ext)
|
if (!ext)
|
||||||
return((ExtensionEntry *) NULL);
|
return((ExtensionEntry *) NULL);
|
||||||
|
bzero(ext, totalExtensionSize);
|
||||||
|
InitExtensionPrivates(ext);
|
||||||
ext->name = (char *)xalloc(strlen(name) + 1);
|
ext->name = (char *)xalloc(strlen(name) + 1);
|
||||||
ext->num_aliases = 0;
|
ext->num_aliases = 0;
|
||||||
ext->aliases = (char **)NULL;
|
ext->aliases = (char **)NULL;
|
||||||
|
@ -144,9 +179,6 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
||||||
ext->errorBase = 0;
|
ext->errorBase = 0;
|
||||||
ext->errorLast = 0;
|
ext->errorLast = 0;
|
||||||
}
|
}
|
||||||
#ifdef XCSECURITY
|
|
||||||
ext->secure = FALSE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(ext);
|
return(ext);
|
||||||
}
|
}
|
||||||
|
@ -207,26 +239,27 @@ CheckExtension(const char *extname)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Added as part of Xace.
|
||||||
|
*/
|
||||||
|
ExtensionEntry *
|
||||||
|
GetExtensionEntry(int major)
|
||||||
|
{
|
||||||
|
if (major < EXTENSION_BASE)
|
||||||
|
return NULL;
|
||||||
|
major -= EXTENSION_BASE;
|
||||||
|
if (major >= NumExtensions)
|
||||||
|
return NULL;
|
||||||
|
return extensions[major];
|
||||||
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
DeclareExtensionSecurity(char *extname, Bool secure)
|
DeclareExtensionSecurity(char *extname, Bool secure)
|
||||||
{
|
{
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
int i = FindExtension(extname, strlen(extname));
|
int i = FindExtension(extname, strlen(extname));
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
{
|
XaceHook(XACE_DECLARE_EXT_SECURE, extensions[i], secure);
|
||||||
int majorop = extensions[i]->base;
|
|
||||||
extensions[i]->secure = secure;
|
|
||||||
if (secure)
|
|
||||||
{
|
|
||||||
UntrustedProcVector[majorop] = ProcVector[majorop];
|
|
||||||
SwappedUntrustedProcVector[majorop] = SwappedProcVector[majorop];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UntrustedProcVector[majorop] = ProcBadRequest;
|
|
||||||
SwappedUntrustedProcVector[majorop] = ProcBadRequest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,10 +337,9 @@ ProcQueryExtension(ClientPtr client)
|
||||||
{
|
{
|
||||||
i = FindExtension((char *)&stuff[1], stuff->nbytes);
|
i = FindExtension((char *)&stuff[1], stuff->nbytes);
|
||||||
if (i < 0
|
if (i < 0
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
/* don't show insecure extensions to untrusted clients */
|
/* call callbacks to find out whether to show extension */
|
||||||
|| (client->trustLevel == XSecurityClientUntrusted &&
|
|| !XaceHook(XACE_EXT_ACCESS, client, extensions[i])
|
||||||
!extensions[i]->secure)
|
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
reply.present = xFalse;
|
reply.present = xFalse;
|
||||||
|
@ -344,10 +376,9 @@ ProcListExtensions(ClientPtr client)
|
||||||
|
|
||||||
for (i=0; i<NumExtensions; i++)
|
for (i=0; i<NumExtensions; i++)
|
||||||
{
|
{
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
/* don't show insecure extensions to untrusted clients */
|
/* call callbacks to find out whether to show extension */
|
||||||
if (client->trustLevel == XSecurityClientUntrusted &&
|
if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i]))
|
||||||
!extensions[i]->secure)
|
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
total_length += strlen(extensions[i]->name) + 1;
|
total_length += strlen(extensions[i]->name) + 1;
|
||||||
|
@ -362,9 +393,8 @@ ProcListExtensions(ClientPtr client)
|
||||||
for (i=0; i<NumExtensions; i++)
|
for (i=0; i<NumExtensions; i++)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (client->trustLevel == XSecurityClientUntrusted &&
|
if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i]))
|
||||||
!extensions[i]->secure)
|
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
*bufptr++ = len = strlen(extensions[i]->name);
|
*bufptr++ = len = strlen(extensions[i]->name);
|
||||||
|
|
|
@ -354,6 +354,7 @@ main(int argc, char *argv[], char *envp[])
|
||||||
InitAtoms();
|
InitAtoms();
|
||||||
InitEvents();
|
InitEvents();
|
||||||
InitGlyphCaching();
|
InitGlyphCaching();
|
||||||
|
ResetExtensionPrivates();
|
||||||
ResetClientPrivates();
|
ResetClientPrivates();
|
||||||
ResetScreenPrivates();
|
ResetScreenPrivates();
|
||||||
ResetWindowPrivates();
|
ResetWindowPrivates();
|
||||||
|
|
|
@ -42,6 +42,7 @@ from The Open Group.
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
#include "site.h"
|
#include "site.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
#include "extnsionst.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See the Wrappers and devPrivates section in "Definition of the
|
* See the Wrappers and devPrivates section in "Definition of the
|
||||||
|
@ -49,6 +50,63 @@ from The Open Group.
|
||||||
* for information on how to use devPrivates.
|
* for information on how to use devPrivates.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* extension private machinery
|
||||||
|
*/
|
||||||
|
|
||||||
|
static int extensionPrivateCount;
|
||||||
|
int extensionPrivateLen;
|
||||||
|
unsigned *extensionPrivateSizes;
|
||||||
|
unsigned totalExtensionSize;
|
||||||
|
|
||||||
|
void
|
||||||
|
ResetExtensionPrivates()
|
||||||
|
{
|
||||||
|
extensionPrivateCount = 0;
|
||||||
|
extensionPrivateLen = 0;
|
||||||
|
xfree(extensionPrivateSizes);
|
||||||
|
extensionPrivateSizes = (unsigned *)NULL;
|
||||||
|
totalExtensionSize =
|
||||||
|
((sizeof(ExtensionEntry) + sizeof(long) - 1) / sizeof(long)) * sizeof(long);
|
||||||
|
}
|
||||||
|
|
||||||
|
_X_EXPORT int
|
||||||
|
AllocateExtensionPrivateIndex()
|
||||||
|
{
|
||||||
|
return extensionPrivateCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
_X_EXPORT Bool
|
||||||
|
AllocateExtensionPrivate(int index2, unsigned amount)
|
||||||
|
{
|
||||||
|
unsigned oldamount;
|
||||||
|
|
||||||
|
/* Round up sizes for proper alignment */
|
||||||
|
amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long);
|
||||||
|
|
||||||
|
if (index2 >= extensionPrivateLen)
|
||||||
|
{
|
||||||
|
unsigned *nsizes;
|
||||||
|
nsizes = (unsigned *)xrealloc(extensionPrivateSizes,
|
||||||
|
(index2 + 1) * sizeof(unsigned));
|
||||||
|
if (!nsizes)
|
||||||
|
return FALSE;
|
||||||
|
while (extensionPrivateLen <= index2)
|
||||||
|
{
|
||||||
|
nsizes[extensionPrivateLen++] = 0;
|
||||||
|
totalExtensionSize += sizeof(DevUnion);
|
||||||
|
}
|
||||||
|
extensionPrivateSizes = nsizes;
|
||||||
|
}
|
||||||
|
oldamount = extensionPrivateSizes[index2];
|
||||||
|
if (amount > oldamount)
|
||||||
|
{
|
||||||
|
extensionPrivateSizes[index2] = amount;
|
||||||
|
totalExtensionSize += (amount - oldamount);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* client private machinery
|
* client private machinery
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -58,8 +58,8 @@ SOFTWARE.
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
|
@ -118,12 +118,12 @@ ProcRotateProperties(ClientPtr client)
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
for (i = 0; i < stuff->nAtoms; i++)
|
for (i = 0; i < stuff->nAtoms; i++)
|
||||||
{
|
{
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
char action = SecurityCheckPropertyAccess(client, pWin, atoms[i],
|
char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i],
|
||||||
SecurityReadAccess|SecurityWriteAccess);
|
SecurityReadAccess|SecurityWriteAccess);
|
||||||
#endif
|
#endif
|
||||||
if (!ValidAtom(atoms[i])
|
if (!ValidAtom(atoms[i])
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
|| (SecurityErrorOperation == action)
|
|| (SecurityErrorOperation == action)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
@ -132,7 +132,7 @@ ProcRotateProperties(ClientPtr client)
|
||||||
client->errorValue = atoms[i];
|
client->errorValue = atoms[i];
|
||||||
return BadAtom;
|
return BadAtom;
|
||||||
}
|
}
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
if (SecurityIgnoreOperation == action)
|
if (SecurityIgnoreOperation == action)
|
||||||
{
|
{
|
||||||
DEALLOCATE_LOCAL(props);
|
DEALLOCATE_LOCAL(props);
|
||||||
|
@ -233,8 +233,8 @@ ProcChangeProperty(ClientPtr client)
|
||||||
return(BadAtom);
|
return(BadAtom);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
switch (SecurityCheckPropertyAccess(client, pWin, stuff->property,
|
switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
|
||||||
SecurityWriteAccess))
|
SecurityWriteAccess))
|
||||||
{
|
{
|
||||||
case SecurityErrorOperation:
|
case SecurityErrorOperation:
|
||||||
|
@ -501,13 +501,13 @@ ProcGetProperty(ClientPtr client)
|
||||||
if (!pProp)
|
if (!pProp)
|
||||||
return NullPropertyReply(client, None, 0, &reply);
|
return NullPropertyReply(client, None, 0, &reply);
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
{
|
{
|
||||||
Mask access_mode = SecurityReadAccess;
|
Mask access_mode = SecurityReadAccess;
|
||||||
|
|
||||||
if (stuff->delete)
|
if (stuff->delete)
|
||||||
access_mode |= SecurityDestroyAccess;
|
access_mode |= SecurityDestroyAccess;
|
||||||
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
|
switch(XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
|
||||||
access_mode))
|
access_mode))
|
||||||
{
|
{
|
||||||
case SecurityErrorOperation:
|
case SecurityErrorOperation:
|
||||||
|
@ -663,8 +663,8 @@ ProcDeleteProperty(register ClientPtr client)
|
||||||
return (BadAtom);
|
return (BadAtom);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
|
switch(XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
|
||||||
SecurityDestroyAccess))
|
SecurityDestroyAccess))
|
||||||
{
|
{
|
||||||
case SecurityErrorOperation:
|
case SecurityErrorOperation:
|
||||||
|
|
|
@ -120,6 +120,9 @@ Equipment Corporation.
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XACE
|
||||||
|
#include "xace.h"
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
static void RebuildTable(
|
static void RebuildTable(
|
||||||
|
@ -818,8 +821,6 @@ LegalNewID(XID id, register ClientPtr client)
|
||||||
!LookupIDByClass(id, RC_ANY)));
|
!LookupIDByClass(id, RC_ANY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
|
||||||
|
|
||||||
/* SecurityLookupIDByType and SecurityLookupIDByClass:
|
/* SecurityLookupIDByType and SecurityLookupIDByClass:
|
||||||
* These are the heart of the resource ID security system. They take
|
* These are the heart of the resource ID security system. They take
|
||||||
* two additional arguments compared to the old LookupID functions:
|
* two additional arguments compared to the old LookupID functions:
|
||||||
|
@ -835,10 +836,6 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
||||||
register ResourcePtr res;
|
register ResourcePtr res;
|
||||||
pointer retval = NULL;
|
pointer retval = NULL;
|
||||||
|
|
||||||
assert(client == NullClient ||
|
|
||||||
(client->index <= currentMaxClients && clients[client->index] == client));
|
|
||||||
assert( (rtype & TypeMask) <= lastResourceType);
|
|
||||||
|
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||||
clientTable[cid].buckets)
|
clientTable[cid].buckets)
|
||||||
{
|
{
|
||||||
|
@ -851,8 +848,11 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (retval && client && client->CheckAccess)
|
#ifdef XACE
|
||||||
retval = (* client->CheckAccess)(client, id, rtype, mode, retval);
|
if (retval && client &&
|
||||||
|
!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, mode, retval))
|
||||||
|
retval = NULL;
|
||||||
|
#endif
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -864,10 +864,6 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
||||||
register ResourcePtr res = NULL;
|
register ResourcePtr res = NULL;
|
||||||
pointer retval = NULL;
|
pointer retval = NULL;
|
||||||
|
|
||||||
assert(client == NullClient ||
|
|
||||||
(client->index <= currentMaxClients && clients[client->index] == client));
|
|
||||||
assert (classes >= lastResourceClass);
|
|
||||||
|
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||||
clientTable[cid].buckets)
|
clientTable[cid].buckets)
|
||||||
{
|
{
|
||||||
|
@ -880,8 +876,11 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (retval && client && client->CheckAccess)
|
#ifdef XACE
|
||||||
retval = (* client->CheckAccess)(client, id, res->type, mode, retval);
|
if (retval && client &&
|
||||||
|
!XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, mode, retval))
|
||||||
|
retval = NULL;
|
||||||
|
#endif
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -902,50 +901,3 @@ LookupIDByClass(XID id, RESTYPE classes)
|
||||||
return SecurityLookupIDByClass(NullClient, id, classes,
|
return SecurityLookupIDByClass(NullClient, id, classes,
|
||||||
SecurityUnknownAccess);
|
SecurityUnknownAccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* not XCSECURITY */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* LookupIDByType returns the object with the given id and type, else NULL.
|
|
||||||
*/
|
|
||||||
pointer
|
|
||||||
LookupIDByType(XID id, RESTYPE rtype)
|
|
||||||
{
|
|
||||||
int cid;
|
|
||||||
register ResourcePtr res;
|
|
||||||
|
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
|
||||||
clientTable[cid].buckets)
|
|
||||||
{
|
|
||||||
res = clientTable[cid].resources[Hash(cid, id)];
|
|
||||||
|
|
||||||
for (; res; res = res->next)
|
|
||||||
if ((res->id == id) && (res->type == rtype))
|
|
||||||
return res->value;
|
|
||||||
}
|
|
||||||
return (pointer)NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* LookupIDByClass returns the object with the given id and any one of the
|
|
||||||
* given classes, else NULL.
|
|
||||||
*/
|
|
||||||
pointer
|
|
||||||
LookupIDByClass(XID id, RESTYPE classes)
|
|
||||||
{
|
|
||||||
int cid;
|
|
||||||
register ResourcePtr res;
|
|
||||||
|
|
||||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
|
||||||
clientTable[cid].buckets)
|
|
||||||
{
|
|
||||||
res = clientTable[cid].resources[Hash(cid, id)];
|
|
||||||
|
|
||||||
for (; res; res = res->next)
|
|
||||||
if ((res->id == id) && (res->type & classes))
|
|
||||||
return res->value;
|
|
||||||
}
|
|
||||||
return (pointer)NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* XCSECURITY */
|
|
||||||
|
|
32
dix/window.c
32
dix/window.c
|
@ -126,8 +126,8 @@ Equipment Corporation.
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
#include "appgroup.h"
|
#include "appgroup.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******
|
/******
|
||||||
|
@ -530,6 +530,10 @@ InitRootWindow(WindowPtr pWin)
|
||||||
/* We SHOULD check for an error value here XXX */
|
/* We SHOULD check for an error value here XXX */
|
||||||
(*pScreen->ChangeWindowAttributes)(pWin, backFlag);
|
(*pScreen->ChangeWindowAttributes)(pWin, backFlag);
|
||||||
|
|
||||||
|
#ifdef XACE
|
||||||
|
XaceHook(XACE_WINDOW_INIT, serverClient, pWin);
|
||||||
|
#endif
|
||||||
|
|
||||||
MapWindow(pWin, serverClient);
|
MapWindow(pWin, serverClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,11 +735,11 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
||||||
}
|
}
|
||||||
|
|
||||||
pWin->borderWidth = bw;
|
pWin->borderWidth = bw;
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
/* can't let untrusted clients have background None windows;
|
/* can't let untrusted clients have background None windows;
|
||||||
* they make it too easy to steal window contents
|
* they make it too easy to steal window contents
|
||||||
*/
|
*/
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
if (!XaceHook(XACE_BACKGRND_ACCESS, client, pWin))
|
||||||
{
|
{
|
||||||
pWin->backgroundState = BackgroundPixel;
|
pWin->backgroundState = BackgroundPixel;
|
||||||
pWin->background.pixel = 0;
|
pWin->background.pixel = 0;
|
||||||
|
@ -762,6 +766,10 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
||||||
REGION_NULL(pScreen, &pWin->winSize);
|
REGION_NULL(pScreen, &pWin->winSize);
|
||||||
REGION_NULL(pScreen, &pWin->borderSize);
|
REGION_NULL(pScreen, &pWin->borderSize);
|
||||||
|
|
||||||
|
#ifdef XACE
|
||||||
|
XaceHook(XACE_WINDOW_INIT, client, pWin);
|
||||||
|
#endif
|
||||||
|
|
||||||
pHead = RealChildHead(pParent);
|
pHead = RealChildHead(pParent);
|
||||||
if (pHead)
|
if (pHead)
|
||||||
{
|
{
|
||||||
|
@ -1025,9 +1033,9 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
|
||||||
borderRelative = TRUE;
|
borderRelative = TRUE;
|
||||||
if (pixID == None)
|
if (pixID == None)
|
||||||
{
|
{
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
/* can't let untrusted clients have background None windows */
|
/* can't let untrusted clients have background None windows */
|
||||||
if (client->trustLevel == XSecurityClientTrusted)
|
if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin))
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
if (pWin->backgroundState == BackgroundPixmap)
|
if (pWin->backgroundState == BackgroundPixmap)
|
||||||
|
@ -1036,7 +1044,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
|
||||||
MakeRootTile(pWin);
|
MakeRootTile(pWin);
|
||||||
else
|
else
|
||||||
pWin->backgroundState = None;
|
pWin->backgroundState = None;
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* didn't change the background to None, so don't tell ddx */
|
{ /* didn't change the background to None, so don't tell ddx */
|
||||||
|
@ -2724,13 +2732,9 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
|
||||||
if (pWin->mapped)
|
if (pWin->mapped)
|
||||||
return(Success);
|
return(Success);
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
/* don't let an untrusted client map a child-of-trusted-window, InputOnly
|
/* general check for permission to map window */
|
||||||
* window; too easy to steal device input
|
if (!XaceHook(XACE_MAP_ACCESS, client, pWin))
|
||||||
*/
|
|
||||||
if ( (client->trustLevel != XSecurityClientTrusted) &&
|
|
||||||
(pWin->drawable.class == InputOnly) &&
|
|
||||||
(wClient(pWin->parent)->trustLevel == XSecurityClientTrusted) )
|
|
||||||
return Success;
|
return Success;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ prints a usage message.
|
||||||
causes all remaining command line arguments to be ignored.
|
causes all remaining command line arguments to be ignored.
|
||||||
.TP 8
|
.TP 8
|
||||||
.B \-maxbigreqsize \fIsize\fP
|
.B \-maxbigreqsize \fIsize\fP
|
||||||
sets the maxmium big request to
|
sets the maximum big request to
|
||||||
.I size
|
.I size
|
||||||
MB.
|
MB.
|
||||||
.TP 8
|
.TP 8
|
||||||
|
@ -449,7 +449,7 @@ the text after the /; it is used to distinguish between instances of
|
||||||
|
|
||||||
<action> ::= a | i | e
|
<action> ::= a | i | e
|
||||||
|
|
||||||
<string> ::= <dbl quoted string> | <single quoted string> | <unqouted string>
|
<string> ::= <dbl quoted string> | <single quoted string> | <unquoted string>
|
||||||
|
|
||||||
<dbl quoted string> ::= <space> " <not dqoute>* " <space>
|
<dbl quoted string> ::= <space> " <not dqoute>* " <space>
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,10 @@ if XORG
|
||||||
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h
|
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
libfb_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
|
||||||
if MMX_CAPABLE
|
if MMX_CAPABLE
|
||||||
libfb_la_CFLAGS = $(AM_CFLAGS) -DUSE_MMX
|
libfb_la_CFLAGS += -DUSE_MMX
|
||||||
|
|
||||||
libfbmmx_la_CFLAGS = \
|
libfbmmx_la_CFLAGS = \
|
||||||
$(DIX_CFLAGS) \
|
$(DIX_CFLAGS) \
|
||||||
|
|
25
fb/fbpict.c
25
fb/fbpict.c
|
@ -1435,6 +1435,10 @@ fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
|
||||||
*/
|
*/
|
||||||
#if !defined(__amd64__) && !defined(__x86_64__)
|
#if !defined(__amd64__) && !defined(__x86_64__)
|
||||||
|
|
||||||
|
#ifdef HAVE_GETISAX
|
||||||
|
#include <sys/auxv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
enum CPUFeatures {
|
enum CPUFeatures {
|
||||||
NoFeatures = 0,
|
NoFeatures = 0,
|
||||||
MMX = 0x1,
|
MMX = 0x1,
|
||||||
|
@ -1445,7 +1449,23 @@ enum CPUFeatures {
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned int detectCPUFeatures(void) {
|
static unsigned int detectCPUFeatures(void) {
|
||||||
|
unsigned int features = 0;
|
||||||
unsigned int result;
|
unsigned int result;
|
||||||
|
|
||||||
|
#ifdef HAVE_GETISAX
|
||||||
|
if (getisax(&result, 1)) {
|
||||||
|
if (result & AV_386_CMOV)
|
||||||
|
features |= CMOV;
|
||||||
|
if (result & AV_386_MMX)
|
||||||
|
features |= MMX;
|
||||||
|
if (result & AV_386_AMD_MMX)
|
||||||
|
features |= MMX_Extensions;
|
||||||
|
if (result & AV_386_SSE)
|
||||||
|
features |= SSE;
|
||||||
|
if (result & AV_386_SSE2)
|
||||||
|
features |= SSE2;
|
||||||
|
}
|
||||||
|
#else
|
||||||
char vendor[13];
|
char vendor[13];
|
||||||
vendor[0] = 0;
|
vendor[0] = 0;
|
||||||
vendor[12] = 0;
|
vendor[12] = 0;
|
||||||
|
@ -1454,7 +1474,8 @@ static unsigned int detectCPUFeatures(void) {
|
||||||
* %esp here. We can't declare either one as clobbered
|
* %esp here. We can't declare either one as clobbered
|
||||||
* since they are special registers (%ebx is the "PIC
|
* since they are special registers (%ebx is the "PIC
|
||||||
* register" holding an offset to global data, %esp the
|
* register" holding an offset to global data, %esp the
|
||||||
* stack pointer), so we need to make sure they have their+ * original values when we access the output operands.
|
* stack pointer), so we need to make sure they have their
|
||||||
|
* original values when we access the output operands.
|
||||||
*/
|
*/
|
||||||
__asm__ ("pushf\n"
|
__asm__ ("pushf\n"
|
||||||
"pop %%eax\n"
|
"pop %%eax\n"
|
||||||
|
@ -1490,7 +1511,6 @@ static unsigned int detectCPUFeatures(void) {
|
||||||
: "%eax", "%ecx", "%edx"
|
: "%eax", "%ecx", "%edx"
|
||||||
);
|
);
|
||||||
|
|
||||||
unsigned int features = 0;
|
|
||||||
if (result) {
|
if (result) {
|
||||||
/* result now contains the standard feature bits */
|
/* result now contains the standard feature bits */
|
||||||
if (result & (1 << 15))
|
if (result & (1 << 15))
|
||||||
|
@ -1524,6 +1544,7 @@ static unsigned int detectCPUFeatures(void) {
|
||||||
features |= MMX_Extensions;
|
features |= MMX_Extensions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_GETISAX */
|
||||||
return features;
|
return features;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
include $(top_srcdir)/cpprules.in
|
||||||
|
|
||||||
if DRI
|
if DRI
|
||||||
DRI_SUBDIR = dri
|
DRI_SUBDIR = dri
|
||||||
endif
|
endif
|
||||||
|
@ -82,7 +84,23 @@ endif
|
||||||
optionsdir = $(libdir)/X11
|
optionsdir = $(libdir)/X11
|
||||||
dist_options_DATA = Options
|
dist_options_DATA = Options
|
||||||
|
|
||||||
|
BUILT_SOURCES = xorg.conf.example
|
||||||
|
CLEAN = xorg.conf.example xorg.conf.example.pre
|
||||||
EXTRA_DIST = xorgconf.cpp
|
EXTRA_DIST = xorgconf.cpp
|
||||||
|
|
||||||
|
CPP_FILES_FLAGS = \
|
||||||
|
-DRGBPATH=\"$(RGB_DB)\" \
|
||||||
|
-DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \
|
||||||
|
-DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \
|
||||||
|
-DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \
|
||||||
|
-DTRUETYPEFONTPATH="\"$(BASE_FONT_PATH)/TTF\"" \
|
||||||
|
-DCIDFONTPATH="\"$(BASE_FONT_PATH)/CID\"" \
|
||||||
|
-DDPI75FONTPATH="\"$(BASE_FONT_PATH)/75dpi\"" \
|
||||||
|
-DDPI100FONTPATH="\"$(BASE_FONT_PATH)/100dpi\"" \
|
||||||
|
-DMODULEPATH=\"$(DEFAULT_MODULE_PATH)\"
|
||||||
|
|
||||||
relink:
|
relink:
|
||||||
rm -f Xorg && $(MAKE) Xorg
|
rm -f Xorg && $(MAKE) Xorg
|
||||||
|
|
||||||
|
xorg.conf.example.pre: xorgconf.cpp
|
||||||
|
cp $< $@
|
||||||
|
|
|
@ -234,7 +234,6 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
|
||||||
|
|
||||||
xf86EnterServerState(SETUP);
|
xf86EnterServerState(SETUP);
|
||||||
Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0);
|
Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0);
|
||||||
xf86EnterServerState(OPERATING);
|
|
||||||
if (Switched) {
|
if (Switched) {
|
||||||
pScr->currentMode = mode;
|
pScr->currentMode = mode;
|
||||||
|
|
||||||
|
@ -269,6 +268,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
|
||||||
pScr->frameY1 = pScr->virtualY - 1;
|
pScr->frameY1 = pScr->virtualY - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
xf86EnterServerState(OPERATING);
|
||||||
|
|
||||||
if (pScr->AdjustFrame)
|
if (pScr->AdjustFrame)
|
||||||
(*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);
|
(*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);
|
||||||
|
|
|
@ -1763,8 +1763,8 @@ xf86PrintBanner()
|
||||||
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
|
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
|
||||||
"Select the \"xorg\" product for bugs you find in this release.\n"
|
"Select the \"xorg\" product for bugs you find in this release.\n"
|
||||||
"Before reporting bugs in pre-release versions please check the\n"
|
"Before reporting bugs in pre-release versions please check the\n"
|
||||||
"latest version in the X.Org Foundation CVS repository.\n"
|
"latest version in the X.Org Foundation git repository.\n"
|
||||||
"See http://wiki.x.org/wiki/CvsPage for CVS access instructions.\n");
|
"See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
|
||||||
#endif
|
#endif
|
||||||
ErrorF("\nX Window System Version %d.%d.%d",
|
ErrorF("\nX Window System Version %d.%d.%d",
|
||||||
XORG_VERSION_MAJOR,
|
XORG_VERSION_MAJOR,
|
||||||
|
|
|
@ -84,7 +84,7 @@ typedef enum {
|
||||||
* mask is 0xFFFF0000.
|
* mask is 0xFFFF0000.
|
||||||
*/
|
*/
|
||||||
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
|
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
|
||||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(1, 0)
|
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(1, 1)
|
||||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(0, 6)
|
#define ABI_XINPUT_VERSION SET_ABI_VERSION(0, 6)
|
||||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
|
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
|
||||||
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
|
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
#define PCI_VENDOR_TRITECH 0x1292
|
#define PCI_VENDOR_TRITECH 0x1292
|
||||||
#define PCI_VENDOR_NVIDIA_SGS 0x12D2
|
#define PCI_VENDOR_NVIDIA_SGS 0x12D2
|
||||||
#define PCI_VENDOR_VMWARE 0x15AD
|
#define PCI_VENDOR_VMWARE 0x15AD
|
||||||
|
#define PCI_VENDOR_AST 0x1A03
|
||||||
#define PCI_VENDOR_3DLABS 0x3D3D
|
#define PCI_VENDOR_3DLABS 0x3D3D
|
||||||
#define PCI_VENDOR_AVANCE_2 0x4005
|
#define PCI_VENDOR_AVANCE_2 0x4005
|
||||||
#define PCI_VENDOR_HERCULES 0x4843
|
#define PCI_VENDOR_HERCULES 0x4843
|
||||||
|
@ -358,6 +359,9 @@
|
||||||
#define PCI_CHIP_RS350_7834 0x7834
|
#define PCI_CHIP_RS350_7834 0x7834
|
||||||
#define PCI_CHIP_RS350_7835 0x7835
|
#define PCI_CHIP_RS350_7835 0x7835
|
||||||
|
|
||||||
|
/* ASPEED Technology (AST) */
|
||||||
|
#define PCI_CHIP_AST2000 0x2000
|
||||||
|
|
||||||
/* Avance Logic */
|
/* Avance Logic */
|
||||||
#define PCI_CHIP_ALG2064 0x2064
|
#define PCI_CHIP_ALG2064 0x2064
|
||||||
#define PCI_CHIP_ALG2301 0x2301
|
#define PCI_CHIP_ALG2301 0x2301
|
||||||
|
|
|
@ -974,6 +974,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
|
||||||
if(!winPriv) {
|
if(!winPriv) {
|
||||||
winPriv = xalloc(sizeof(XF86XVWindowRec));
|
winPriv = xalloc(sizeof(XF86XVWindowRec));
|
||||||
if(!winPriv) return BadAlloc;
|
if(!winPriv) return BadAlloc;
|
||||||
|
memset(winPriv, 0, sizeof(XF86XVWindowRec));
|
||||||
winPriv->PortRec = portPriv;
|
winPriv->PortRec = portPriv;
|
||||||
winPriv->next = PrivRoot;
|
winPriv->next = PrivRoot;
|
||||||
pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
|
pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
|
||||||
|
@ -1026,6 +1027,9 @@ xf86XVDestroyWindow(WindowPtr pWin)
|
||||||
|
|
||||||
pPriv->pDraw = NULL;
|
pPriv->pDraw = NULL;
|
||||||
tmp = WinPriv;
|
tmp = WinPriv;
|
||||||
|
if(WinPriv->pGC) {
|
||||||
|
FreeGC(WinPriv->pGC, 0);
|
||||||
|
}
|
||||||
WinPriv = WinPriv->next;
|
WinPriv = WinPriv->next;
|
||||||
xfree(tmp);
|
xfree(tmp);
|
||||||
}
|
}
|
||||||
|
@ -1118,6 +1122,8 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
|
||||||
while(WinPriv) {
|
while(WinPriv) {
|
||||||
pPriv = WinPriv->PortRec;
|
pPriv = WinPriv->PortRec;
|
||||||
|
|
||||||
|
if(!pPriv) goto next;
|
||||||
|
|
||||||
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
|
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
|
||||||
REGION_DESTROY(pScreen, pPriv->pCompositeClip);
|
REGION_DESTROY(pScreen, pPriv->pCompositeClip);
|
||||||
|
|
||||||
|
@ -1148,6 +1154,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
next:
|
||||||
pPrev = WinPriv;
|
pPrev = WinPriv;
|
||||||
WinPriv = WinPriv->next;
|
WinPriv = WinPriv->next;
|
||||||
}
|
}
|
||||||
|
@ -1739,9 +1746,13 @@ xf86XVPutImage(
|
||||||
REGION_UNINIT(pScreen, &VPReg);
|
REGION_UNINIT(pScreen, &VPReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(portPriv->pDraw) {
|
/* If we are changing windows, unregister our port in the old window */
|
||||||
|
if(portPriv->pDraw && (portPriv->pDraw != pDraw))
|
||||||
xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
|
xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
|
||||||
}
|
|
||||||
|
/* Register our port with the new window */
|
||||||
|
ret = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
||||||
|
if(ret != Success) goto PUT_IMAGE_BAILOUT;
|
||||||
|
|
||||||
if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
|
if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
|
||||||
clippedAway = TRUE;
|
clippedAway = TRUE;
|
||||||
|
@ -1772,7 +1783,6 @@ xf86XVPutImage(
|
||||||
if((ret == Success) &&
|
if((ret == Success) &&
|
||||||
(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
|
(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
|
||||||
|
|
||||||
xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
|
||||||
portPriv->isOn = XV_ON;
|
portPriv->isOn = XV_ON;
|
||||||
portPriv->pDraw = pDraw;
|
portPriv->pDraw = pDraw;
|
||||||
portPriv->drw_x = drw_x; portPriv->drw_y = drw_y;
|
portPriv->drw_x = drw_x; portPriv->drw_y = drw_y;
|
||||||
|
@ -1813,6 +1823,56 @@ xf86XVQueryImageAttributes(
|
||||||
format->id, width, height, pitches, offsets);
|
format->id, width, height, pitches, offsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_X_EXPORT void
|
||||||
|
xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
|
||||||
|
{
|
||||||
|
ScreenPtr pScreen = pDraw->pScreen;
|
||||||
|
WindowPtr pWin = (WindowPtr)pDraw;
|
||||||
|
XF86XVWindowPtr pPriv = GET_XF86XV_WINDOW(pWin);
|
||||||
|
GCPtr pGC = NULL;
|
||||||
|
XID pval[2];
|
||||||
|
BoxPtr pbox = REGION_RECTS(clipboxes);
|
||||||
|
int i, nbox = REGION_NUM_RECTS(clipboxes);
|
||||||
|
xRectangle *rects;
|
||||||
|
|
||||||
|
if(!xf86Screens[pScreen->myNum]->vtSema) return;
|
||||||
|
|
||||||
|
if(pPriv)
|
||||||
|
pGC = pPriv->pGC;
|
||||||
|
|
||||||
|
if(!pGC) {
|
||||||
|
int status;
|
||||||
|
pval[0] = key;
|
||||||
|
pval[1] = IncludeInferiors;
|
||||||
|
pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status);
|
||||||
|
if(!pGC) return;
|
||||||
|
ValidateGC(pDraw, pGC);
|
||||||
|
if (pPriv) pPriv->pGC = pGC;
|
||||||
|
} else if (key != pGC->fgPixel){
|
||||||
|
pval[0] = key;
|
||||||
|
ChangeGC(pGC, GCForeground, pval);
|
||||||
|
ValidateGC(pDraw, pGC);
|
||||||
|
}
|
||||||
|
|
||||||
|
REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y);
|
||||||
|
|
||||||
|
rects = ALLOCATE_LOCAL(nbox * sizeof(xRectangle));
|
||||||
|
|
||||||
|
for(i = 0; i < nbox; i++, pbox++) {
|
||||||
|
rects[i].x = pbox->x1;
|
||||||
|
rects[i].y = pbox->y1;
|
||||||
|
rects[i].width = pbox->x2 - pbox->x1;
|
||||||
|
rects[i].height = pbox->y2 - pbox->y1;
|
||||||
|
}
|
||||||
|
|
||||||
|
(*pGC->ops->PolyFillRect)(pDraw, pGC, nbox, rects);
|
||||||
|
|
||||||
|
if (!pPriv) FreeGC(pGC, 0);
|
||||||
|
|
||||||
|
DEALLOCATE_LOCAL(rects);
|
||||||
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
||||||
{
|
{
|
||||||
|
|
|
@ -232,6 +232,9 @@ void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
|
||||||
void
|
void
|
||||||
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
|
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes);
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
xf86XVClipVideoHelper(
|
xf86XVClipVideoHelper(
|
||||||
BoxPtr dst,
|
BoxPtr dst,
|
||||||
|
|
|
@ -80,6 +80,7 @@ typedef struct {
|
||||||
typedef struct _XF86XVWindowRec{
|
typedef struct _XF86XVWindowRec{
|
||||||
XvPortRecPrivatePtr PortRec;
|
XvPortRecPrivatePtr PortRec;
|
||||||
struct _XF86XVWindowRec *next;
|
struct _XF86XVWindowRec *next;
|
||||||
|
GCPtr pGC;
|
||||||
} XF86XVWindowRec, *XF86XVWindowPtr;
|
} XF86XVWindowRec, *XF86XVWindowPtr;
|
||||||
|
|
||||||
#endif /* _XF86XVPRIV_H_ */
|
#endif /* _XF86XVPRIV_H_ */
|
||||||
|
|
|
@ -125,7 +125,12 @@ extern void ShmRegisterFuncs(
|
||||||
ShmFuncsPtr funcs);
|
ShmFuncsPtr funcs);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef XACE
|
||||||
|
extern void XaceExtensionInit(INITARGS);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
extern void SecurityExtensionSetup(INITARGS);
|
||||||
extern void SecurityExtensionInit(INITARGS);
|
extern void SecurityExtensionInit(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1081,7 +1081,7 @@ Include the set of modes listed in the
|
||||||
.B Modes
|
.B Modes
|
||||||
section called
|
section called
|
||||||
.IR modesection-id.
|
.IR modesection-id.
|
||||||
This make all of the modes defined in that section available for use by
|
This makes all of the modes defined in that section available for use by
|
||||||
this monitor.
|
this monitor.
|
||||||
.TP 7
|
.TP 7
|
||||||
.BI "Mode \*q" name \*q
|
.BI "Mode \*q" name \*q
|
||||||
|
|
|
@ -162,7 +162,7 @@ _X_HIDDEN void *dixLookupTab[] = {
|
||||||
SYMFUNC(QueueWorkProc)
|
SYMFUNC(QueueWorkProc)
|
||||||
SYMFUNC(RegisterBlockAndWakeupHandlers)
|
SYMFUNC(RegisterBlockAndWakeupHandlers)
|
||||||
SYMFUNC(RemoveBlockAndWakeupHandlers)
|
SYMFUNC(RemoveBlockAndWakeupHandlers)
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
SYMFUNC(SecurityLookupDrawable)
|
SYMFUNC(SecurityLookupDrawable)
|
||||||
SYMFUNC(SecurityLookupWindow)
|
SYMFUNC(SecurityLookupWindow)
|
||||||
#endif
|
#endif
|
||||||
|
@ -255,6 +255,8 @@ _X_HIDDEN void *dixLookupTab[] = {
|
||||||
SYMFUNC(GetScratchPixmapHeader)
|
SYMFUNC(GetScratchPixmapHeader)
|
||||||
SYMFUNC(FreeScratchPixmapHeader)
|
SYMFUNC(FreeScratchPixmapHeader)
|
||||||
/* privates.c */
|
/* privates.c */
|
||||||
|
SYMFUNC(AllocateExtensionPrivate)
|
||||||
|
SYMFUNC(AllocateExtensionPrivateIndex)
|
||||||
SYMFUNC(AllocateClientPrivate)
|
SYMFUNC(AllocateClientPrivate)
|
||||||
SYMFUNC(AllocateClientPrivateIndex)
|
SYMFUNC(AllocateClientPrivateIndex)
|
||||||
SYMFUNC(AllocateGCPrivate)
|
SYMFUNC(AllocateGCPrivate)
|
||||||
|
@ -282,10 +284,8 @@ _X_HIDDEN void *dixLookupTab[] = {
|
||||||
SYMFUNC(LookupIDByType)
|
SYMFUNC(LookupIDByType)
|
||||||
SYMFUNC(LookupIDByClass)
|
SYMFUNC(LookupIDByClass)
|
||||||
SYMFUNC(LegalNewID)
|
SYMFUNC(LegalNewID)
|
||||||
#ifdef XCSECURITY
|
|
||||||
SYMFUNC(SecurityLookupIDByClass)
|
SYMFUNC(SecurityLookupIDByClass)
|
||||||
SYMFUNC(SecurityLookupIDByType)
|
SYMFUNC(SecurityLookupIDByType)
|
||||||
#endif
|
|
||||||
SYMFUNC(FindClientResourcesByType)
|
SYMFUNC(FindClientResourcesByType)
|
||||||
SYMFUNC(FindAllClientResources)
|
SYMFUNC(FindAllClientResources)
|
||||||
SYMVAR(lastResourceType)
|
SYMVAR(lastResourceType)
|
||||||
|
|
|
@ -625,6 +625,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
||||||
SYMFUNC(xf86XVAllocateVideoAdaptorRec)
|
SYMFUNC(xf86XVAllocateVideoAdaptorRec)
|
||||||
SYMFUNC(xf86XVFreeVideoAdaptorRec)
|
SYMFUNC(xf86XVFreeVideoAdaptorRec)
|
||||||
SYMFUNC(xf86XVFillKeyHelper)
|
SYMFUNC(xf86XVFillKeyHelper)
|
||||||
|
SYMFUNC(xf86XVFillKeyHelperDrawable)
|
||||||
SYMFUNC(xf86XVClipVideoHelper)
|
SYMFUNC(xf86XVClipVideoHelper)
|
||||||
SYMFUNC(xf86XVCopyYUV12ToPacked)
|
SYMFUNC(xf86XVCopyYUV12ToPacked)
|
||||||
SYMFUNC(xf86XVCopyPacked)
|
SYMFUNC(xf86XVCopyPacked)
|
||||||
|
|
|
@ -498,7 +498,7 @@ xf86GetPciDomain(PCITAG Tag)
|
||||||
pPCI = xf86GetPciHostConfigFromTag(Tag);
|
pPCI = xf86GetPciHostConfigFromTag(Tag);
|
||||||
|
|
||||||
if (pPCI && (result = PCI_DOM_FROM_BUS(pPCI->busnum)))
|
if (pPCI && (result = PCI_DOM_FROM_BUS(pPCI->busnum)))
|
||||||
return result;
|
return result + 1;
|
||||||
|
|
||||||
if (!pPCI || pPCI->fakeDevice)
|
if (!pPCI || pPCI->fakeDevice)
|
||||||
return 1; /* Domain 0 is reserved */
|
return 1; /* Domain 0 is reserved */
|
||||||
|
|
|
@ -56,6 +56,7 @@ endif
|
||||||
if NEED_STRLCAT
|
if NEED_STRLCAT
|
||||||
STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
|
STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
|
||||||
endif
|
endif
|
||||||
|
endif BUILD_XORGCFG
|
||||||
|
|
||||||
xorgcfg_SOURCES = \
|
xorgcfg_SOURCES = \
|
||||||
accessx.c \
|
accessx.c \
|
||||||
|
@ -95,10 +96,7 @@ xorgcfg_SOURCES = \
|
||||||
xf86config.h \
|
xf86config.h \
|
||||||
$(STRL_SRCS)
|
$(STRL_SRCS)
|
||||||
|
|
||||||
XBMdir = $(includedir)/X11/bitmaps
|
BITMAPS = \
|
||||||
XPMdir = $(includedir)/X11/pixmaps
|
|
||||||
|
|
||||||
XBM_DATA = \
|
|
||||||
card.xbm \
|
card.xbm \
|
||||||
keyboard.xbm \
|
keyboard.xbm \
|
||||||
monitor.xbm \
|
monitor.xbm \
|
||||||
|
@ -112,7 +110,7 @@ XBM_DATA = \
|
||||||
shorter.xbm \
|
shorter.xbm \
|
||||||
taller.xbm
|
taller.xbm
|
||||||
|
|
||||||
XPM_DATA = \
|
PIXMAPS = \
|
||||||
card.xpm \
|
card.xpm \
|
||||||
computer.xpm \
|
computer.xpm \
|
||||||
keyboard.xpm \
|
keyboard.xpm \
|
||||||
|
@ -122,6 +120,13 @@ XPM_DATA = \
|
||||||
# Rules needed to cpp man page & app-defaults
|
# Rules needed to cpp man page & app-defaults
|
||||||
include $(top_srcdir)/cpprules.in
|
include $(top_srcdir)/cpprules.in
|
||||||
|
|
||||||
|
if BUILD_XORGCFG
|
||||||
|
XBMdir = $(includedir)/X11/bitmaps
|
||||||
|
XPMdir = $(includedir)/X11/pixmaps
|
||||||
|
|
||||||
|
XBM_DATA = $(BITMAPS)
|
||||||
|
XPM_DATA = $(PIXMAPS)
|
||||||
|
|
||||||
# App default files (*.ad)
|
# App default files (*.ad)
|
||||||
|
|
||||||
appdefaultdir = @APPDEFAULTDIR@
|
appdefaultdir = @APPDEFAULTDIR@
|
||||||
|
@ -146,7 +151,6 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||||
|
|
||||||
all-local: $(appman_PRE) $(appman_DATA)
|
all-local: $(appman_PRE) $(appman_DATA)
|
||||||
|
|
||||||
EXTRA_DIST = $(XBM_DATA) $(XPM_DATA) XOrgCfg.pre xorgcfg.man.pre
|
|
||||||
BUILT_SOURCES = $(appman_PRE)
|
BUILT_SOURCES = $(appman_PRE)
|
||||||
CLEANFILES = $(APPDEFAULTFILES) $(BUILT_SOURCES) $(appman_DATA)
|
CLEANFILES = $(APPDEFAULTFILES) $(BUILT_SOURCES) $(appman_DATA)
|
||||||
|
|
||||||
|
@ -156,4 +160,6 @@ SUFFIXES += .$(APP_MAN_SUFFIX) .man
|
||||||
-rm -f $@
|
-rm -f $@
|
||||||
$(LN_S) $< $@
|
$(LN_S) $< $@
|
||||||
|
|
||||||
endif
|
endif BUILD_XORGCFG
|
||||||
|
|
||||||
|
EXTRA_DIST = $(BITMAPS) $(PIXMAPS) XOrgCfg.pre xorgcfg.man.pre
|
||||||
|
|
|
@ -1128,6 +1128,7 @@ CardConfig(void)
|
||||||
static char *xdrivers[] = {
|
static char *xdrivers[] = {
|
||||||
"apm",
|
"apm",
|
||||||
"ark",
|
"ark",
|
||||||
|
"ast",
|
||||||
"ati",
|
"ati",
|
||||||
"r128",
|
"r128",
|
||||||
"radeon",
|
"radeon",
|
||||||
|
|
|
@ -51,6 +51,11 @@ NAME ** Ark Logic (generic) [ark]
|
||||||
SERVER SVGA
|
SERVER SVGA
|
||||||
DRIVER ark
|
DRIVER ark
|
||||||
|
|
||||||
|
NAME ** ASPEED Technology (generic) [ast]
|
||||||
|
#CHIPSET ast
|
||||||
|
SERVER SVGA
|
||||||
|
DRIVER ast
|
||||||
|
|
||||||
NAME ** ATI (generic) [ati]
|
NAME ** ATI (generic) [ati]
|
||||||
#CHIPSET ati
|
#CHIPSET ati
|
||||||
SERVER SVGA
|
SERVER SVGA
|
||||||
|
|
|
@ -54,12 +54,9 @@ XCOMM command (or a combination of both methods)
|
||||||
|
|
||||||
FontPath LOCALFONTPATH
|
FontPath LOCALFONTPATH
|
||||||
FontPath MISCFONTPATH
|
FontPath MISCFONTPATH
|
||||||
FontPath DPI75USFONTPATH
|
|
||||||
FontPath DPI100USFONTPATH
|
|
||||||
FontPath T1FONTPATH
|
FontPath T1FONTPATH
|
||||||
FontPath TRUETYPEFONTPATH
|
FontPath TRUETYPEFONTPATH
|
||||||
FontPath CIDFONTPATH
|
FontPath CIDFONTPATH
|
||||||
FontPath SPFONTPATH
|
|
||||||
FontPath DPI75FONTPATH
|
FontPath DPI75FONTPATH
|
||||||
FontPath DPI100FONTPATH
|
FontPath DPI100FONTPATH
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,9 @@
|
||||||
/* Define to 1 if you have the `geteuid' function. */
|
/* Define to 1 if you have the `geteuid' function. */
|
||||||
#undef HAVE_GETEUID
|
#undef HAVE_GETEUID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getisax' function. */
|
||||||
|
#undef HAVE_GETISAX
|
||||||
|
|
||||||
/* Define to 1 if you have the `getopt' function. */
|
/* Define to 1 if you have the `getopt' function. */
|
||||||
#undef HAVE_GETOPT
|
#undef HAVE_GETOPT
|
||||||
|
|
||||||
|
@ -308,6 +311,9 @@
|
||||||
/* unaligned word accesses behave as expected */
|
/* unaligned word accesses behave as expected */
|
||||||
#undef WORKING_UNALIGNED_INT
|
#undef WORKING_UNALIGNED_INT
|
||||||
|
|
||||||
|
/* Build X-ACE extension */
|
||||||
|
#undef XACE
|
||||||
|
|
||||||
/* Support XCMisc extension */
|
/* Support XCMisc extension */
|
||||||
#undef XCMISC
|
#undef XCMISC
|
||||||
|
|
||||||
|
|
|
@ -87,12 +87,9 @@ SOFTWARE.
|
||||||
((client->lastDrawableID == did) ? \
|
((client->lastDrawableID == did) ? \
|
||||||
client->lastDrawable : (DrawablePtr)LookupDrawable(did, client))
|
client->lastDrawable : (DrawablePtr)LookupDrawable(did, client))
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
|
|
||||||
#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
|
#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
|
||||||
if (client->lastDrawableID == did && !client->trustLevel)\
|
|
||||||
pDraw = client->lastDrawable;\
|
|
||||||
else \
|
|
||||||
{\
|
{\
|
||||||
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
|
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
|
||||||
RC_DRAWABLE, mode);\
|
RC_DRAWABLE, mode);\
|
||||||
|
@ -106,9 +103,6 @@ SOFTWARE.
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
|
#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
|
||||||
if (client->lastDrawableID == did && !client->trustLevel)\
|
|
||||||
pDraw = client->lastDrawable;\
|
|
||||||
else \
|
|
||||||
{\
|
{\
|
||||||
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
|
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
|
||||||
RC_DRAWABLE, mode);\
|
RC_DRAWABLE, mode);\
|
||||||
|
@ -120,9 +114,6 @@ SOFTWARE.
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
|
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
|
||||||
if (client->lastGCID == rid && !client->trustLevel)\
|
|
||||||
pGC = client->lastGC;\
|
|
||||||
else\
|
|
||||||
pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
|
pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
|
||||||
if (!pGC)\
|
if (!pGC)\
|
||||||
{\
|
{\
|
||||||
|
@ -139,7 +130,7 @@ SOFTWARE.
|
||||||
#define VERIFY_GC(pGC, rid, client)\
|
#define VERIFY_GC(pGC, rid, client)\
|
||||||
SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess)
|
SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess)
|
||||||
|
|
||||||
#else /* not XCSECURITY */
|
#else /* not XACE */
|
||||||
|
|
||||||
#define VERIFY_DRAWABLE(pDraw, did, client)\
|
#define VERIFY_DRAWABLE(pDraw, did, client)\
|
||||||
if (client->lastDrawableID == did)\
|
if (client->lastDrawableID == did)\
|
||||||
|
@ -189,7 +180,7 @@ SOFTWARE.
|
||||||
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
|
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
|
||||||
VERIFY_GC(pGC, rid, client)
|
VERIFY_GC(pGC, rid, client)
|
||||||
|
|
||||||
#endif /* XCSECURITY */
|
#endif /* XACE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We think that most hardware implementations of DBE will want
|
* We think that most hardware implementations of DBE will want
|
||||||
|
@ -384,7 +375,7 @@ extern int CompareISOLatin1Lowered(
|
||||||
unsigned char * /*b*/,
|
unsigned char * /*b*/,
|
||||||
int blen);
|
int blen);
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
|
|
||||||
extern WindowPtr SecurityLookupWindow(
|
extern WindowPtr SecurityLookupWindow(
|
||||||
XID /*rid*/,
|
XID /*rid*/,
|
||||||
|
@ -420,7 +411,7 @@ extern pointer LookupDrawable(
|
||||||
#define SecurityLookupDrawable(rid, client, access_mode) \
|
#define SecurityLookupDrawable(rid, client, access_mode) \
|
||||||
LookupDrawable(rid, client)
|
LookupDrawable(rid, client)
|
||||||
|
|
||||||
#endif /* XCSECURITY */
|
#endif /* XACE */
|
||||||
|
|
||||||
extern ClientPtr LookupClient(
|
extern ClientPtr LookupClient(
|
||||||
XID /*rid*/,
|
XID /*rid*/,
|
||||||
|
|
|
@ -128,16 +128,6 @@ typedef struct _Client {
|
||||||
int requestLogIndex;
|
int requestLogIndex;
|
||||||
#endif
|
#endif
|
||||||
unsigned long replyBytesRemaining;
|
unsigned long replyBytesRemaining;
|
||||||
#ifdef XCSECURITY
|
|
||||||
XID authId;
|
|
||||||
unsigned int trustLevel;
|
|
||||||
pointer (* CheckAccess)(
|
|
||||||
ClientPtr /*pClient*/,
|
|
||||||
XID /*id*/,
|
|
||||||
RESTYPE /*classes*/,
|
|
||||||
Mask /*access_mode*/,
|
|
||||||
pointer /*resourceval*/);
|
|
||||||
#endif
|
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
struct _AppGroupRec* appgroup;
|
struct _AppGroupRec* appgroup;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,6 +58,14 @@ extern Bool EnableDisableExtension(char *name, Bool enable);
|
||||||
|
|
||||||
extern void EnableDisableExtensionError(char *name, Bool enable);
|
extern void EnableDisableExtensionError(char *name, Bool enable);
|
||||||
|
|
||||||
|
extern void ResetExtensionPrivates(void);
|
||||||
|
|
||||||
|
extern int AllocateExtensionPrivateIndex(void);
|
||||||
|
|
||||||
|
extern Bool AllocateExtensionPrivate(
|
||||||
|
int /*index*/,
|
||||||
|
unsigned /*amount*/);
|
||||||
|
|
||||||
extern void InitExtensions(int argc, char **argv);
|
extern void InitExtensions(int argc, char **argv);
|
||||||
|
|
||||||
extern void InitVisualWrap(void);
|
extern void InitVisualWrap(void);
|
||||||
|
|
|
@ -48,6 +48,7 @@ SOFTWARE.
|
||||||
#ifndef EXTENSIONSTRUCT_H
|
#ifndef EXTENSIONSTRUCT_H
|
||||||
#define EXTENSIONSTRUCT_H
|
#define EXTENSIONSTRUCT_H
|
||||||
|
|
||||||
|
#include "dix.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "screenint.h"
|
#include "screenint.h"
|
||||||
#include "extension.h"
|
#include "extension.h"
|
||||||
|
@ -68,9 +69,7 @@ typedef struct _ExtensionEntry {
|
||||||
pointer extPrivate;
|
pointer extPrivate;
|
||||||
unsigned short (* MinorOpcode)( /* called for errors */
|
unsigned short (* MinorOpcode)( /* called for errors */
|
||||||
ClientPtr /* client */);
|
ClientPtr /* client */);
|
||||||
#ifdef XCSECURITY
|
DevUnion *devPrivates;
|
||||||
Bool secure; /* extension visible to untrusted clients? */
|
|
||||||
#endif
|
|
||||||
} ExtensionEntry;
|
} ExtensionEntry;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -127,6 +126,7 @@ extern Bool AddExtensionAlias(
|
||||||
ExtensionEntry * /*extension*/);
|
ExtensionEntry * /*extension*/);
|
||||||
|
|
||||||
extern ExtensionEntry *CheckExtension(const char *extname);
|
extern ExtensionEntry *CheckExtension(const char *extname);
|
||||||
|
extern ExtensionEntry *GetExtensionEntry(int major);
|
||||||
|
|
||||||
extern ExtensionLookupProc LookupProc(
|
extern ExtensionLookupProc LookupProc(
|
||||||
char* /*name*/,
|
char* /*name*/,
|
||||||
|
|
|
@ -225,8 +225,6 @@ extern pointer LookupClientResourceComplex(
|
||||||
#define SecurityWriteAccess (1<<1) /* changing the object */
|
#define SecurityWriteAccess (1<<1) /* changing the object */
|
||||||
#define SecurityDestroyAccess (1<<2) /* destroying the object */
|
#define SecurityDestroyAccess (1<<2) /* destroying the object */
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
|
||||||
|
|
||||||
extern pointer SecurityLookupIDByType(
|
extern pointer SecurityLookupIDByType(
|
||||||
ClientPtr /*client*/,
|
ClientPtr /*client*/,
|
||||||
XID /*id*/,
|
XID /*id*/,
|
||||||
|
@ -239,15 +237,6 @@ extern pointer SecurityLookupIDByClass(
|
||||||
RESTYPE /*classes*/,
|
RESTYPE /*classes*/,
|
||||||
Mask /*access_mode*/);
|
Mask /*access_mode*/);
|
||||||
|
|
||||||
#else /* not XCSECURITY */
|
|
||||||
|
|
||||||
#define SecurityLookupIDByType(client, id, rtype, access_mode) \
|
|
||||||
LookupIDByType(id, rtype)
|
|
||||||
|
|
||||||
#define SecurityLookupIDByClass(client, id, classes, access_mode) \
|
|
||||||
LookupIDByClass(id, classes)
|
|
||||||
|
|
||||||
#endif /* XCSECURITY */
|
|
||||||
|
|
||||||
extern void GetXIDRange(
|
extern void GetXIDRange(
|
||||||
int /*client*/,
|
int /*client*/,
|
||||||
|
|
|
@ -241,6 +241,9 @@ typedef void (*InitExtension)(INITARGS);
|
||||||
#define _XAG_SERVER_
|
#define _XAG_SERVER_
|
||||||
#include <X11/extensions/Xagstr.h>
|
#include <X11/extensions/Xagstr.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XACE
|
||||||
|
#include "xace.h"
|
||||||
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#include "securitysrv.h"
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/securstr.h>
|
#include <X11/extensions/securstr.h>
|
||||||
|
@ -311,7 +314,11 @@ extern void DbeExtensionInit(INITARGS);
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
extern void XagExtensionInit(INITARGS);
|
extern void XagExtensionInit(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XACE
|
||||||
|
extern void XaceExtensionInit(INITARGS);
|
||||||
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
|
extern void SecurityExtensionSetup(INITARGS);
|
||||||
extern void SecurityExtensionInit(INITARGS);
|
extern void SecurityExtensionInit(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
#ifdef XPRINT
|
#ifdef XPRINT
|
||||||
|
@ -522,6 +529,9 @@ InitExtensions(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
|
#ifdef XCSECURITY
|
||||||
|
SecurityExtensionSetup();
|
||||||
|
#endif
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
# if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX)
|
# if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX)
|
||||||
if (!noPanoramiXExtension) PanoramiXExtensionInit();
|
if (!noPanoramiXExtension) PanoramiXExtensionInit();
|
||||||
|
@ -584,6 +594,9 @@ InitExtensions(argc, argv)
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
if (!noXagExtension) XagExtensionInit();
|
if (!noXagExtension) XagExtensionInit();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XACE
|
||||||
|
XaceExtensionInit();
|
||||||
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
if (!noSecurityExtension) SecurityExtensionInit();
|
if (!noSecurityExtension) SecurityExtensionInit();
|
||||||
#endif
|
#endif
|
||||||
|
@ -686,8 +699,11 @@ static ExtensionModule staticExtensions[] = {
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
{ XagExtensionInit, XAGNAME, &noXagExtension, NULL, NULL },
|
{ XagExtensionInit, XAGNAME, &noXagExtension, NULL, NULL },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XACE
|
||||||
|
{ XaceExtensionInit, XACE_EXTENSION_NAME, NULL, NULL, NULL },
|
||||||
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
{ SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL },
|
{ SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, SecurityExtensionSetup, NULL },
|
||||||
#endif
|
#endif
|
||||||
#ifdef XPRINT
|
#ifdef XPRINT
|
||||||
{ XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL },
|
{ XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL },
|
||||||
|
|
18
os/access.c
18
os/access.c
|
@ -202,8 +202,8 @@ SOFTWARE.
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "osdep.h"
|
#include "osdep.h"
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XACE
|
||||||
#include "securitysrv.h"
|
#include "xace.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
|
@ -1386,15 +1386,6 @@ _X_EXPORT Bool LocalClient(ClientPtr client)
|
||||||
pointer addr;
|
pointer addr;
|
||||||
register HOST *host;
|
register HOST *host;
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
|
||||||
/* untrusted clients can't change host access */
|
|
||||||
if (client->trustLevel != XSecurityClientTrusted)
|
|
||||||
{
|
|
||||||
SecurityAudit("client %d attempted to change host access\n",
|
|
||||||
client->index);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
|
if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
|
||||||
¬used, &alen, &from))
|
¬used, &alen, &from))
|
||||||
{
|
{
|
||||||
|
@ -1537,6 +1528,11 @@ AuthorizedClient(ClientPtr client)
|
||||||
{
|
{
|
||||||
if (!client || defeatAccessControl)
|
if (!client || defeatAccessControl)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#ifdef XACE
|
||||||
|
/* untrusted clients can't change host access */
|
||||||
|
if (!XaceHook(XACE_HOSTLIST_ACCESS, client, SecurityWriteAccess))
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
return LocalClient(client);
|
return LocalClient(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,9 @@ extern __const__ int _nfiles;
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
#include "appgroup.h"
|
#include "appgroup.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XACE
|
||||||
|
#include "xace.h"
|
||||||
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#include "securitysrv.h"
|
#include "securitysrv.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -690,9 +693,8 @@ ClientAuthorized(ClientPtr client,
|
||||||
/* indicate to Xdmcp protocol that we've opened new client */
|
/* indicate to Xdmcp protocol that we've opened new client */
|
||||||
XdmcpOpenDisplay(priv->fd);
|
XdmcpOpenDisplay(priv->fd);
|
||||||
#endif /* XDMCP */
|
#endif /* XDMCP */
|
||||||
#ifdef XAPPGROUP
|
#ifdef XACE
|
||||||
if (ClientStateCallback)
|
XaceHook(XACE_AUTH_AVAIL, client, auth_id);
|
||||||
XagCallClientStateChange (client);
|
|
||||||
#endif
|
#endif
|
||||||
/* At this point, if the client is authorized to change the access control
|
/* At this point, if the client is authorized to change the access control
|
||||||
* list, we should getpeername() information, and add the client to
|
* list, we should getpeername() information, and add the client to
|
||||||
|
|
|
@ -466,6 +466,54 @@ ProcRRDispatch (ClientPtr client)
|
||||||
return (*ProcRandrVector[stuff->data]) (client);
|
return (*ProcRandrVector[stuff->data]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcRRGetScreenInfo (ClientPtr client)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xRRGetScreenInfoReq);
|
||||||
|
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->window, n);
|
||||||
|
return ProcRRGetScreenInfo(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcRRSetScreenConfig (ClientPtr client)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xRRSetScreenConfigReq);
|
||||||
|
|
||||||
|
if (RRClientKnowsRates (client))
|
||||||
|
{
|
||||||
|
REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
|
||||||
|
swaps (&stuff->rate, n);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
|
||||||
|
}
|
||||||
|
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->drawable, n);
|
||||||
|
swapl(&stuff->timestamp, n);
|
||||||
|
swaps(&stuff->sizeID, n);
|
||||||
|
swaps(&stuff->rotation, n);
|
||||||
|
return ProcRRSetScreenConfig(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcRRSelectInput (ClientPtr client)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xRRSelectInputReq);
|
||||||
|
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->window, n);
|
||||||
|
swaps(&stuff->enable, n);
|
||||||
|
return ProcRRSelectInput(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRDispatch (ClientPtr client)
|
SProcRRDispatch (ClientPtr client)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue