static char buffer[128];
const char *chipset;
- switch (i915_screen(screen)->pci_id) {
+ switch (i915_screen(screen)->iws->pci_id) {
case PCI_CHIP_I915_G:
chipset = "915G";
break;
* Create a new i915_screen object
*/
struct pipe_screen *
-i915_create_screen(struct i915_winsys *iws, uint pci_id)
+i915_screen_create(struct i915_winsys *iws)
{
struct i915_screen *is = CALLOC_STRUCT(i915_screen);
if (!is)
return NULL;
- switch (pci_id) {
+ switch (iws->pci_id) {
case PCI_CHIP_I915_G:
case PCI_CHIP_I915_GM:
is->is_i945 = FALSE;
default:
debug_printf("%s: unknown pci id 0x%x, cannot create screen\n",
- __FUNCTION__, pci_id);
+ __FUNCTION__, iws->pci_id);
FREE(is);
return NULL;
}
- is->pci_id = pci_id;
is->iws = iws;
is->base.winsys = NULL;
struct i915_winsys *iws;
boolean is_i945;
- uint pci_id;
};
/**
struct i915_winsys {
+ unsigned pci_id; /**< PCI ID for the device */
+
/**
* Batchbuffer functions.
*/
/**
* Create i915 pipe_screen.
*/
-struct pipe_screen *i915_create_screen(struct i915_winsys *iws, unsigned pci_id);
+struct pipe_screen *i915_screen_create(struct i915_winsys *iws);
#endif
i915_drm_winsys_init_fence_functions(idws);
idws->fd = drmFD;
- idws->id = deviceID;
+ idws->base.pci_id = deviceID;
idws->max_batch_size = 16 * 4096;
idws->base.destroy = i915_drm_winsys_destroy;
idws->dump_cmd = debug_get_bool_option("INTEL_DUMP_CMD", FALSE);
- return i915_create_screen(&idws->base, deviceID);
+ return i915_screen_create(&idws->base);
}
static struct drm_api i915_drm_api =
int fd; /**< Drm file discriptor */
- unsigned id;
-
size_t max_batch_size;
struct {
isws->base.destroy = i915_sw_destroy;
- isws->id = deviceID;
+ isws->base.pci_id = deviceID;
isws->max_batch_size = 16 * 4096;
isws->dump_cmd = debug_get_bool_option("INTEL_DUMP_CMD", FALSE);
/* XXX so this will leak winsys:es */
- return i915_create_screen(&isws->base, deviceID);
+ return i915_screen_create(&isws->base);
}
boolean dump_cmd;
- unsigned id;
-
size_t max_batch_size;
};