summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2009-06-11 16:00:03 +0200
committerMaciej Cencora <m.cencora@gmail.com>2009-08-15 15:14:24 +0200
commit8d60c0b7514dad075e5d46448614e8e8c5c230a7 (patch)
tree2d1acc2a5f16e3b2eba39b2f912cbe12c78bbc5c /src/mesa
parentc903834d4d533e3095fa520afef65d185362cf5d (diff)
downloadexternal_mesa3d-8d60c0b7514dad075e5d46448614e8e8c5c230a7.zip
external_mesa3d-8d60c0b7514dad075e5d46448614e8e8c5c230a7.tar.gz
external_mesa3d-8d60c0b7514dad075e5d46448614e8e8c5c230a7.tar.bz2
r300: clear not_flushed OQ list after flush
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c13
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_buffer_objects.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c4
3 files changed, 15 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index 7558f9e..da801f4 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -44,6 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/imports.h"
#include "main/macros.h"
#include "main/context.h"
+#include "main/simple_list.h"
#include "swrast/swrast.h"
#include "radeon_common.h"
@@ -56,6 +57,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_reg.h"
#include "r300_emit.h"
#include "r300_context.h"
+#include "r300_queryobj.h"
#include "vblank.h"
@@ -753,10 +755,19 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask)
}
}
+static void r300Flush(GLcontext *ctx)
+{
+ r300ContextPtr r300 = R300_CONTEXT(ctx);
+
+ radeonFlush(ctx);
+
+ make_empty_list(&r300->query.not_flushed_head);
+}
+
void r300InitIoctlFuncs(struct dd_function_table *functions)
{
functions->Clear = r300Clear;
functions->Finish = radeonFinish;
- functions->Flush = radeonFlush;
+ functions->Flush = r300Flush;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
index 6955692..827f1d2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
+++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
@@ -181,7 +181,7 @@ radeonMapBuffer(GLcontext * ctx,
struct radeon_buffer_object *radeon_obj = get_radeon_buffer_object(obj);
if (access == GL_WRITE_ONLY_ARB) {
- radeonFlush(ctx);
+ ctx->Driver.Flush(ctx);
}
if (radeon_obj->bo == NULL) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 330c2c8..0614c89 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -880,7 +880,7 @@ void radeon_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei he
if (!radeon->meta.internal_viewport_call && ctx->DrawBuffer->Name == 0) {
if (radeon->is_front_buffer_rendering) {
- radeonFlush(ctx);
+ ctx->Driver.Flush(ctx);
}
radeon_update_renderbuffers(driContext, driContext->driDrawablePriv);
if (driContext->driDrawablePriv != driContext->driReadablePriv)
@@ -1211,7 +1211,7 @@ void rcommonInitCmdBuf(radeonContextPtr rmesa)
rmesa->cmdbuf.size = size;
radeon_cs_space_set_flush(rmesa->cmdbuf.cs,
- (void (*)(void *))radeonFlush, rmesa->glCtx);
+ (void (*)(void *))rmesa->glCtx->Driver.Flush, rmesa->glCtx);
if (!rmesa->radeonScreen->kernel_mm) {
radeon_cs_set_limit(rmesa->cmdbuf.cs, RADEON_GEM_DOMAIN_VRAM, rmesa->radeonScreen->texSize[0]);