Module: Mesa
Branch: master
Commit: e292f38c6c2aba28299b988ec4654b7c02d9adb8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e292f38c6c2aba28299b988ec4654b7c02d9adb8

Author: Brian Paul <bri...@vmware.com>
Date:   Fri Aug 19 10:15:14 2016 -0600

svga: loosen the condition to flush in get_query_result_vgpu10()

Fixes piglit spec/ext_transform_feedback/overflow-edge-cases segfaults
because the query's fence pointer was null.

Tested with Piglit, Sauerbraten, ETQW.

Reviewed-by: Charmaine Lee <charmai...@vmware.com>

---

 src/gallium/drivers/svga/svga_pipe_query.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_query.c 
b/src/gallium/drivers/svga/svga_pipe_query.c
index f09590a..dcb26eb 100644
--- a/src/gallium/drivers/svga/svga_pipe_query.c
+++ b/src/gallium/drivers/svga/svga_pipe_query.c
@@ -638,7 +638,7 @@ get_query_result_vgpu10(struct svga_context *svga, struct 
svga_query *sq,
 
    sws->query_get_result(sws, sq->gb_query, sq->offset, &queryState, result, 
resultLen);
 
-   if (queryState == SVGA3D_QUERYSTATE_NEW && !sq->fence) {
+   if (!sq->fence) {
       /* The query hasn't been submitted yet.  We need to submit it now
        * since the GL spec says "Querying the state for a given occlusion
        * query forces that occlusion query to complete within a finite amount

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to