projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: pass the current context to the flush_front state tracker function
[mesa.git]
/
src
/
mesa
/
state_tracker
/
st_cb_condrender.c
diff --git
a/src/mesa/state_tracker/st_cb_condrender.c
b/src/mesa/state_tracker/st_cb_condrender.c
index b509d43b7c6975ce6b3be29b3925c6da31daf6f0..1ced560e1607e98834085af31014556cfa4a1dc4 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_condrender.c
+++ b/
src/mesa/state_tracker/st_cb_condrender.c
@@
-41,19
+41,23
@@
#include "st_context.h"
#include "st_cb_queryobj.h"
#include "st_cb_condrender.h"
#include "st_context.h"
#include "st_cb_queryobj.h"
#include "st_cb_condrender.h"
+#include "st_cb_bitmap.h"
/**
* Called via ctx->Driver.BeginConditionalRender()
*/
static void
/**
* Called via ctx->Driver.BeginConditionalRender()
*/
static void
-st_BeginConditionalRender(
GL
context *ctx, struct gl_query_object *q,
+st_BeginConditionalRender(
struct gl_
context *ctx, struct gl_query_object *q,
GLenum mode)
{
struct st_query_object *stq = st_query_object(q);
GLenum mode)
{
struct st_query_object *stq = st_query_object(q);
- struct pipe_context *pipe = st_context(ctx)->pipe;
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
uint m;
uint m;
+ st_flush_bitmap_cache(st);
+
switch (mode) {
case GL_QUERY_WAIT:
m = PIPE_RENDER_COND_WAIT;
switch (mode) {
case GL_QUERY_WAIT:
m = PIPE_RENDER_COND_WAIT;
@@
-72,6
+76,9
@@
st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q,
m = PIPE_RENDER_COND_WAIT;
}
m = PIPE_RENDER_COND_WAIT;
}
+ st->render_condition = stq->pq;
+ st->condition_mode = m;
+
pipe->render_condition(pipe, stq->pq, m);
}
pipe->render_condition(pipe, stq->pq, m);
}
@@
-80,11
+87,16
@@
st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q,
* Called via ctx->Driver.BeginConditionalRender()
*/
static void
* Called via ctx->Driver.BeginConditionalRender()
*/
static void
-st_EndConditionalRender(
GL
context *ctx, struct gl_query_object *q)
+st_EndConditionalRender(
struct gl_
context *ctx, struct gl_query_object *q)
{
{
- struct pipe_context *pipe = st_context(ctx)->pipe;
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
(void) q;
(void) q;
+
+ st_flush_bitmap_cache(st);
+
pipe->render_condition(pipe, NULL, 0);
pipe->render_condition(pipe, NULL, 0);
+ st->render_condition = NULL;
}
}