summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2007-08-08 16:42:29 +0100
committerKeith Whitwell <[email protected]>2007-08-09 11:23:18 +0100
commitb0e57f789c2ae266fc51874c480d033309075468 (patch)
tree0f41adf42f15d5ba902d3885f36d53a0a29c4f05 /src/mesa
parent93d5cfd8b7c641c5656aed38ad2f9559e09502f0 (diff)
Hook up pipe flush functionality
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c1
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.c115
2 files changed, 56 insertions, 60 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
index a85dc0b6131..80a3163d55b 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
@@ -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;
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c
index 66be3af72b9..c1d541199f9 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c
@@ -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,56 +360,6 @@ intelCreateContext(const __GLcontextModes * mesaVis,
_vbo_CreateContext(ctx);
_tnl_CreateContext(ctx);
- /*
- * Pipe-related setup
- */
- if (!getenv("INTEL_HW")) {
- intel->pipe = intel_create_softpipe( intel );
- }
- else {
- switch (intel->intelScreen->deviceID) {
- case PCI_CHIP_I945_G:
- case PCI_CHIP_I945_GM:
- case PCI_CHIP_I945_GME:
- case PCI_CHIP_G33_G:
- case PCI_CHIP_Q33_G:
- case PCI_CHIP_Q35_G:
- case PCI_CHIP_I915_G:
- case PCI_CHIP_I915_GM:
- intel->pipe = intel_create_i915simple( intel );
- break;
- default:
- _mesa_printf("Unknown PCIID %x in %s, using software driver\n",
- intel->intelScreen->deviceID, __FUNCTION__);
-
- intel->pipe = intel_create_softpipe( intel );
- break;
- }
- }
-
- st_create_context( &intel->ctx, intel->pipe );
-
-
- /* TODO: Push this down into the pipe driver:
- */
- switch (intel->intelScreen->deviceID) {
- case PCI_CHIP_I945_G:
- case PCI_CHIP_I945_GM:
- case PCI_CHIP_I945_GME:
- case PCI_CHIP_G33_G:
- case PCI_CHIP_Q33_G:
- case PCI_CHIP_Q35_G:
- intel->pipe->mipmap_tree_layout = i945_miptree_layout;
- break;
- case PCI_CHIP_I915_G:
- case PCI_CHIP_I915_GM:
- case PCI_CHIP_I830_M:
- case PCI_CHIP_I855_GM:
- case PCI_CHIP_I865_G:
- intel->pipe->mipmap_tree_layout = i915_miptree_layout;
- default:
- assert(0); /*FIX*/
- }
/*
@@ -471,6 +412,60 @@ intelCreateContext(const __GLcontextModes * mesaVis,
#endif
+
+
+ /*
+ * Pipe-related setup
+ */
+ if (!getenv("INTEL_HW")) {
+ intel->pipe = intel_create_softpipe( intel );
+ }
+ else {
+ switch (intel->intelScreen->deviceID) {
+ case PCI_CHIP_I945_G:
+ case PCI_CHIP_I945_GM:
+ case PCI_CHIP_I945_GME:
+ case PCI_CHIP_G33_G:
+ case PCI_CHIP_Q33_G:
+ case PCI_CHIP_Q35_G:
+ case PCI_CHIP_I915_G:
+ case PCI_CHIP_I915_GM:
+ intel->pipe = intel_create_i915simple( intel );
+ break;
+ default:
+ _mesa_printf("Unknown PCIID %x in %s, using software driver\n",
+ intel->intelScreen->deviceID, __FUNCTION__);
+
+ intel->pipe = intel_create_softpipe( intel );
+ break;
+ }
+ }
+
+ st_create_context( &intel->ctx, intel->pipe );
+
+
+ /* TODO: Push this down into the pipe driver:
+ */
+ switch (intel->intelScreen->deviceID) {
+ case PCI_CHIP_I945_G:
+ case PCI_CHIP_I945_GM:
+ case PCI_CHIP_I945_GME:
+ case PCI_CHIP_G33_G:
+ case PCI_CHIP_Q33_G:
+ case PCI_CHIP_Q35_G:
+ intel->pipe->mipmap_tree_layout = i945_miptree_layout;
+ break;
+ case PCI_CHIP_I915_G:
+ case PCI_CHIP_I915_GM:
+ case PCI_CHIP_I830_M:
+ case PCI_CHIP_I855_GM:
+ case PCI_CHIP_I865_G:
+ intel->pipe->mipmap_tree_layout = i915_miptree_layout;
+ default:
+ assert(0); /*FIX*/
+ }
+
+
return GL_TRUE;
}