aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_manager.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-06 19:27:25 +0100
committerMarc Haesen <marc@hc-consult.be>2012-01-06 19:27:25 +0100
commit7e9f4ea970e8f7008c212d7d3918a974eb0066da (patch)
tree92cf7fcdf6e8093e743346af2397f3caa17cffe3 /mesalib/src/mesa/state_tracker/st_manager.c
parent9715b7fab0757c86e1bb151f3dce0b324bcff692 (diff)
downloadvcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.gz
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.bz2
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.zip
libX11 mesa pixman git update 6 jan 2012
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_manager.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_manager.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c
index 828f0d81f..c0af3ce11 100644
--- a/mesalib/src/mesa/state_tracker/st_manager.c
+++ b/mesalib/src/mesa/state_tracker/st_manager.c
@@ -535,7 +535,7 @@ st_context_teximage(struct st_context_iface *stctxi,
texFormat = st_ChooseTextureFormat(ctx, internalFormat,
GL_BGRA, GL_UNSIGNED_BYTE);
- _mesa_init_teximage_fields(ctx, target, texImage,
+ _mesa_init_teximage_fields(ctx, texImage,
tex->width0, tex->height0, 1, 0,
internalFormat, texFormat);
@@ -647,9 +647,13 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
if (attribs->major > 1 || attribs->minor > 0) {
_mesa_compute_version(st->ctx);
- /* is the actual version less than the requested version? */
+ /* Is the actual version less than the requested version? Mesa can't
+ * yet enforce the added restrictions of a forward-looking context, so
+ * fail that too.
+ */
if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor <
- attribs->major * 10 + attribs->minor) {
+ attribs->major * 10 + attribs->minor
+ || (attribs->flags & ~ST_CONTEXT_FLAG_DEBUG) != 0) {
*error = ST_CONTEXT_ERROR_BAD_VERSION;
st_destroy_context(st);
return NULL;