diff options
author | marha <marha@users.sourceforge.net> | 2014-03-28 17:35:36 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-28 17:35:36 +0100 |
commit | cbfb19790917d271b8ca6156554b16acc802719f (patch) | |
tree | 830af0dc6e08b5d0c7124fec143e90255f3feee3 /mesalib/src/mesa/state_tracker/st_cb_queryobj.c | |
parent | d02e6760412c7a96abbc4d0add5dd8d5e83bbe27 (diff) | |
download | vcxsrv-cbfb19790917d271b8ca6156554b16acc802719f.tar.gz vcxsrv-cbfb19790917d271b8ca6156554b16acc802719f.tar.bz2 vcxsrv-cbfb19790917d271b8ca6156554b16acc802719f.zip |
libxtrans fontconfig mesa xserver git update 28 Mar 2014
xserver commit a2880699e8f1f576e1a48ebf25e8982463323f84
libxtrans commit 68f60238c4224f954ff6556ae778c72e420175f0
fontconfig commit fcba9ef01c978323fc71c17e455d3cd6ae35edcc
mesa commit 029ccd773d01a5f801c809c499516d7b0c4cc3f8
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_queryobj.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_queryobj.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c index 5186a5157..78a737094 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c +++ b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c @@ -141,7 +141,13 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q) stq->pq = pipe->create_query(pipe, type); stq->type = type; } - pipe->begin_query(pipe, stq->pq); + if (stq->pq) { + pipe->begin_query(pipe, stq->pq); + } + else { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery"); + return; + } } assert(stq->type == type); } @@ -162,7 +168,8 @@ st_EndQuery(struct gl_context *ctx, struct gl_query_object *q) stq->type = PIPE_QUERY_TIMESTAMP; } - pipe->end_query(pipe, stq->pq); + if (stq->pq) + pipe->end_query(pipe, stq->pq); } @@ -171,6 +178,13 @@ get_query_result(struct pipe_context *pipe, struct st_query_object *stq, boolean wait) { + if (!stq->pq) { + /* Only needed in case we failed to allocate the gallium query earlier. + * Return TRUE so we don't spin on this forever. + */ + return TRUE; + } + if (!pipe->get_query_result(pipe, stq->pq, wait, |