int fthrottle_mode;
GLboolean havePools;
struct pipe_context *pipe;
+ struct pipe_winsys *winsys;
struct st_context *st_share = NULL;
if (sharedContextPrivate) {
__intel_debug = driParseDebugString(getenv("INTEL_DEBUG"), debug_control);
#endif
+ winsys = intel_create_pipe_winsys( intel );
/*
* Pipe-related setup
*/
if (!getenv("INTEL_HW")) {
- pipe = intel_create_softpipe( intel );
+ pipe = intel_create_softpipe( intel, winsys );
}
else {
switch (intel->intelScreen->deviceID) {
case PCI_CHIP_Q35_G:
case PCI_CHIP_I915_G:
case PCI_CHIP_I915_GM:
- pipe = intel_create_i915simple( intel );
+ pipe = intel_create_i915simple( intel, winsys );
break;
default:
fprintf(stderr, "Unknown PCIID %x in %s, using software driver\n",
intel->intelScreen->deviceID, __FUNCTION__);
- pipe = intel_create_softpipe( intel );
+ pipe = intel_create_softpipe( intel, winsys );
break;
}
}
intel_create_pipe_winsys( struct intel_context *intel );
struct pipe_context *
-intel_create_softpipe( struct intel_context *intel );
+intel_create_softpipe( struct intel_context *intel,
+ struct pipe_winsys *winsys );
struct pipe_context *
-intel_create_i915simple( struct intel_context *intel );
+intel_create_i915simple( struct intel_context *intel,
+ struct pipe_winsys *winsys );
}
-
+/**
+ * Create i915 hardware rendering context.
+ */
struct pipe_context *
-intel_create_i915simple( struct intel_context *intel )
+intel_create_i915simple( struct intel_context *intel,
+ struct pipe_winsys *winsys )
{
struct intel_i915_winsys *iws = CALLOC_STRUCT( intel_i915_winsys );
/* Create the i915simple context:
*/
- return i915_create( intel_create_pipe_winsys(intel),
- &iws->winsys,
+ return i915_create( winsys,
+ &iws->winsys,
intel->intelScreen->deviceID );
}
}
+/**
+ * Create rendering context which uses software rendering.
+ */
struct pipe_context *
-intel_create_softpipe( struct intel_context *intel )
+intel_create_softpipe( struct intel_context *intel,
+ struct pipe_winsys *winsys )
{
struct intel_softpipe_winsys *isws = CALLOC_STRUCT( intel_softpipe_winsys );
/* Create the softpipe context:
*/
- return softpipe_create( intel_create_pipe_winsys( intel ),
- &isws->sws );
+ return softpipe_create( winsys, &isws->sws );
}