aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-08 08:31:07 +0000
committermarha <marha@users.sourceforge.net>2011-03-08 08:31:07 +0000
commit62f8e1becaed544f600e167508fe76bc953d647e (patch)
tree175c3d80e16613dbe92a497836bf685d1324803d /mesalib/src/mesa/state_tracker
parentb1236880df6cbd13760a2adfaff9c22a89501d66 (diff)
parent8c74e7257ed453143c53086f884f6c6ff585379a (diff)
downloadvcxsrv-62f8e1becaed544f600e167508fe76bc953d647e.tar.gz
vcxsrv-62f8e1becaed544f600e167508fe76bc953d647e.tar.bz2
vcxsrv-62f8e1becaed544f600e167508fe76bc953d647e.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_fbo.c6
-rw-r--r--mesalib/src/mesa/state_tracker/st_manager.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
index 7e124186c..534fa7041 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
@@ -79,7 +79,11 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx,
else
format = st_choose_renderbuffer_format(screen, internalFormat,
rb->NumSamples);
-
+
+ if (format == PIPE_FORMAT_NONE) {
+ return FALSE;
+ }
+
/* init renderbuffer fields */
strb->Base.Width = width;
strb->Base.Height = height;
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c
index 5684e9768..ed668d248 100644
--- a/mesalib/src/mesa/state_tracker/st_manager.c
+++ b/mesalib/src/mesa/state_tracker/st_manager.c
@@ -684,8 +684,9 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
if (attribs->major > 1 || attribs->minor > 0) {
_mesa_compute_version(st->ctx);
- if (st->ctx->VersionMajor < attribs->major ||
- st->ctx->VersionMajor < attribs->minor) {
+ /* is the actual version less than the requested version? */
+ if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor <
+ attribs->major * 10 + attribs->minor) {
st_destroy_context(st);
return NULL;
}