summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h1
-rw-r--r--src/gallium/drivers/softpipe/sp_query.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_surface.c2
4 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index 141b7a8b185..14cfdc8c23b 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -175,12 +175,14 @@ softpipe_is_resource_referenced( struct pipe_context *pipe,
static void
softpipe_render_condition( struct pipe_context *pipe,
struct pipe_query *query,
+ boolean condition,
uint mode )
{
struct softpipe_context *softpipe = softpipe_context( pipe );
softpipe->render_cond_query = query;
softpipe->render_cond_mode = mode;
+ softpipe->render_cond_cond = condition;
}
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index ea6c0f929c5..d7a00b95b25 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -144,6 +144,7 @@ struct softpipe_context {
/** Conditional query object and mode */
struct pipe_query *render_cond_query;
uint render_cond_mode;
+ boolean render_cond_cond;
/** Polygon stipple items */
struct {
diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c
index b444e378085..b5bc0db4490 100644
--- a/src/gallium/drivers/softpipe/sp_query.c
+++ b/src/gallium/drivers/softpipe/sp_query.c
@@ -261,7 +261,7 @@ softpipe_check_render_cond(struct softpipe_context *sp)
b = pipe->get_query_result(pipe, sp->render_cond_query, wait,
(void*)&result);
if (b)
- return result > 0;
+ return (!result == sp->render_cond_cond);
else
return TRUE;
}
diff --git a/src/gallium/drivers/softpipe/sp_surface.c b/src/gallium/drivers/softpipe/sp_surface.c
index 911c34df1b8..52c85be2e3f 100644
--- a/src/gallium/drivers/softpipe/sp_surface.c
+++ b/src/gallium/drivers/softpipe/sp_surface.c
@@ -78,7 +78,7 @@ static void sp_blit(struct pipe_context *pipe,
sp->num_sampler_views[PIPE_SHADER_FRAGMENT],
sp->sampler_views[PIPE_SHADER_FRAGMENT]);
util_blitter_save_render_condition(sp->blitter, sp->render_cond_query,
- sp->render_cond_mode);
+ sp->render_cond_cond, sp->render_cond_mode);
util_blitter_blit(sp->blitter, info);
}