Hook up pipe flush functionality

This commit is contained in:
Keith Whitwell
2007-08-08 16:42:29 +01:00
parent 93d5cfd8b7
commit b0e57f789c
2 changed files with 56 additions and 60 deletions
@@ -324,6 +324,7 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
r->buf = buffer;
r->offset = batch->ptr - batch->map;
r->delta = delta;
*(GLuint *) batch->ptr = 0x12345678;
}
batch->ptr += 4;
@@ -250,13 +250,7 @@ intelFlush(GLcontext * ctx)
{
struct intel_context *intel = intel_context(ctx);
INTEL_FIREVERTICES(intel);
if (intel->batch->map != intel->batch->ptr)
intel_batchbuffer_flush(intel->batch);
/* XXX: Need to do an MI_FLUSH here.
*/
intel->pipe->flush( intel->pipe, 0 );
}
@@ -317,9 +311,6 @@ intelInitDriverFunctions(struct dd_function_table *functions)
functions->GetString = intelGetString;
functions->UpdateState = intelInvalidateState;
/*
intelInitTextureFuncs(functions);
*/
intelInitBufferFuncs(functions);
st_init_driver_functions(functions);
@@ -369,6 +360,60 @@ intelCreateContext(const __GLcontextModes * mesaVis,
_vbo_CreateContext(ctx);
_tnl_CreateContext(ctx);
/*
* memory pools
*/
DRM_LIGHT_LOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
havePools = intelCreatePools(intelScreen);
DRM_UNLOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
if (!havePools)
return GL_FALSE;
/* Dri stuff */
intel->hHWContext = driContextPriv->hHWContext;
intel->driFd = sPriv->fd;
intel->driHwLock = (drmLock *) & sPriv->pSAREA->lock;
TNL_CONTEXT(ctx)->Driver.RunPipeline = _tnl_run_pipeline;
fthrottle_mode = driQueryOptioni(&intel->optionCache, "fthrottle_mode");
intel->iw.irq_seq = -1;
intel->irqsEmitted = 0;
/* Disable imaging extension until convolution is working in
* teximage paths:
*/
driInitExtensions(ctx, card_extensions,
/* GL_TRUE, */
GL_FALSE);
intel->batch = intel_batchbuffer_alloc(intel);
intel->last_swap_fence = NULL;
intel->first_swap_fence = NULL;
intel_fbo_init(intel);
if (intel->ctx.Mesa_DXTn) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
_mesa_enable_extension(ctx, "GL_S3_s3tc");
}
else if (driQueryOptionb(&intel->optionCache, "force_s3tc_enable")) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
}
#if DO_DEBUG
INTEL_DEBUG = driParseDebugString(getenv("INTEL_DEBUG"), debug_control);
#endif
/*
* Pipe-related setup
*/
@@ -421,56 +466,6 @@ intelCreateContext(const __GLcontextModes * mesaVis,
}
/*
* memory pools
*/
DRM_LIGHT_LOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
havePools = intelCreatePools(intelScreen);
DRM_UNLOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
if (!havePools)
return GL_FALSE;
/* Dri stuff */
intel->hHWContext = driContextPriv->hHWContext;
intel->driFd = sPriv->fd;
intel->driHwLock = (drmLock *) & sPriv->pSAREA->lock;
TNL_CONTEXT(ctx)->Driver.RunPipeline = _tnl_run_pipeline;
fthrottle_mode = driQueryOptioni(&intel->optionCache, "fthrottle_mode");
intel->iw.irq_seq = -1;
intel->irqsEmitted = 0;
/* Disable imaging extension until convolution is working in
* teximage paths:
*/
driInitExtensions(ctx, card_extensions,
/* GL_TRUE, */
GL_FALSE);
intel->batch = intel_batchbuffer_alloc(intel);
intel->last_swap_fence = NULL;
intel->first_swap_fence = NULL;
intel_fbo_init(intel);
if (intel->ctx.Mesa_DXTn) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
_mesa_enable_extension(ctx, "GL_S3_s3tc");
}
else if (driQueryOptionb(&intel->optionCache, "force_s3tc_enable")) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
}
#if DO_DEBUG
INTEL_DEBUG = driParseDebugString(getenv("INTEL_DEBUG"), debug_control);
#endif
return GL_TRUE;
}