Go to the source code of this file.
Data Structures | |
struct | i915_screen |
Subclass of pipe_screen. More... | |
Functions | |
static struct i915_screen * | i915_screen (struct pipe_screen *pscreen) |
cast wrapper | |
struct pipe_screen * | i915_create_screen (struct pipe_winsys *winsys, uint pci_id) |
Create a new i915_screen object. |
struct pipe_screen* i915_create_screen | ( | struct pipe_winsys * | winsys, | |
uint | pci_id | |||
) | [read] |
Create a new i915_screen object.
Definition at line 239 of file i915_screen.c.
References CALLOC_STRUCT, debug_printf(), pipe_screen::destroy, FALSE, pipe_screen::get_name, pipe_screen::get_param, pipe_screen::get_paramf, pipe_screen::get_vendor, i915_destroy_screen(), i915_get_name(), i915_get_param(), i915_get_paramf(), i915_get_vendor(), i915_init_screen_texture_functions(), i915_is_format_supported(), i915_surface_map(), i915_surface_unmap(), pipe_screen::is_format_supported, i915_screen::is_i945, PCI_CHIP_G33_G, PCI_CHIP_I915_G, PCI_CHIP_I915_GM, PCI_CHIP_I945_G, PCI_CHIP_I945_GM, PCI_CHIP_I945_GME, PCI_CHIP_Q33_G, PCI_CHIP_Q35_G, i915_screen::pci_id, i915_screen::screen, pipe_screen::surface_map, pipe_screen::surface_unmap, TRUE, and pipe_screen::winsys.
00240 { 00241 struct i915_screen *i915screen = CALLOC_STRUCT(i915_screen); 00242 00243 if (!i915screen) 00244 return NULL; 00245 00246 switch (pci_id) { 00247 case PCI_CHIP_I915_G: 00248 case PCI_CHIP_I915_GM: 00249 i915screen->is_i945 = FALSE; 00250 break; 00251 00252 case PCI_CHIP_I945_G: 00253 case PCI_CHIP_I945_GM: 00254 case PCI_CHIP_I945_GME: 00255 case PCI_CHIP_G33_G: 00256 case PCI_CHIP_Q33_G: 00257 case PCI_CHIP_Q35_G: 00258 i915screen->is_i945 = TRUE; 00259 break; 00260 00261 default: 00262 debug_printf("%s: unknown pci id 0x%x, cannot create screen\n", 00263 __FUNCTION__, pci_id); 00264 return NULL; 00265 } 00266 00267 i915screen->pci_id = pci_id; 00268 00269 i915screen->screen.winsys = winsys; 00270 00271 i915screen->screen.destroy = i915_destroy_screen; 00272 00273 i915screen->screen.get_name = i915_get_name; 00274 i915screen->screen.get_vendor = i915_get_vendor; 00275 i915screen->screen.get_param = i915_get_param; 00276 i915screen->screen.get_paramf = i915_get_paramf; 00277 i915screen->screen.is_format_supported = i915_is_format_supported; 00278 i915screen->screen.surface_map = i915_surface_map; 00279 i915screen->screen.surface_unmap = i915_surface_unmap; 00280 00281 i915_init_screen_texture_functions(&i915screen->screen); 00282 00283 return &i915screen->screen; 00284 }
static struct i915_screen* i915_screen | ( | struct pipe_screen * | pscreen | ) | [static, read] |
cast wrapper
Definition at line 55 of file i915_screen.h.
00056 { 00057 return (struct i915_screen *) pscreen; 00058 }