diff options
author | marha <marha@users.sourceforge.net> | 2012-01-06 19:27:25 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2012-01-06 19:27:25 +0100 |
commit | 7e9f4ea970e8f7008c212d7d3918a974eb0066da (patch) | |
tree | 92cf7fcdf6e8093e743346af2397f3caa17cffe3 /mesalib/src/mesa/drivers/dri/swrast | |
parent | 9715b7fab0757c86e1bb151f3dce0b324bcff692 (diff) | |
download | vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.gz vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.bz2 vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.zip |
libX11 mesa pixman git update 6 jan 2012
Diffstat (limited to 'mesalib/src/mesa/drivers/dri/swrast')
-rw-r--r-- | mesalib/src/mesa/drivers/dri/swrast/swrast.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c index ac82dc7d5..4f6d0160f 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c @@ -91,7 +91,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, else texFormat = MESA_FORMAT_ARGB8888; - _mesa_init_teximage_fields(&dri_ctx->Base, target, texImage, + _mesa_init_teximage_fields(&dri_ctx->Base, texImage, w, h, 1, 0, internalFormat, texFormat); sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)swImage->Data, @@ -702,7 +702,12 @@ InitExtensionsES2(struct gl_context *ctx) static GLboolean dri_create_context(gl_api api, const struct gl_config * visual, - __DRIcontext * cPriv, void *sharedContextPrivate) + __DRIcontext * cPriv, + unsigned major_version, + unsigned minor_version, + uint32_t flags, + unsigned *error, + void *sharedContextPrivate) { struct dri_context *ctx = NULL; struct dri_context *share = (struct dri_context *)sharedContextPrivate; @@ -712,9 +717,22 @@ dri_create_context(gl_api api, TRACE; + /* Flag filtering is handled in dri2CreateContextAttribs. + */ + (void) flags; + + if (api == API_OPENGL + && (major_version > 2 + || (major_version == 2 && minor_version > 1))) { + *error = __DRI_CTX_ERROR_BAD_VERSION; + goto context_fail; + } + ctx = CALLOC_STRUCT(dri_context); - if (ctx == NULL) + if (ctx == NULL) { + *error = __DRI_CTX_ERROR_NO_MEMORY; goto context_fail; + } cPriv->driverPrivate = ctx; ctx->cPriv = cPriv; @@ -731,6 +749,7 @@ dri_create_context(gl_api api, /* basic context setup */ if (!_mesa_initialize_context(mesaCtx, api, visual, sharedCtx, &functions, (void *) cPriv)) { + *error = __DRI_CTX_ERROR_NO_MEMORY; goto context_fail; } @@ -772,6 +791,7 @@ dri_create_context(gl_api api, break; } + *error = __DRI_CTX_ERROR_SUCCESS; return GL_TRUE; context_fail: |