diff options
author | Jakob Bornecrantz <[email protected]> | 2010-06-28 20:59:09 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-06-28 21:14:45 +0200 |
commit | a01e0afd9fc0d647081c6903baa1a7ba505c4b05 (patch) | |
tree | 7e04eb2b4e87137455920f6131b064dc87056e14 /src/gallium/drivers/i965 | |
parent | 250b92f3bb4fc4a53f3150b0e8ff1e121a5adbc7 (diff) | |
parent | 9ca563a9a8573bf79821abc75ccf0fdade19c8a9 (diff) |
Merge branch 'gallium-drm-driver-drescriptor'
Conflicts:
src/gallium/state_trackers/egl/x11/native_dri2.c
src/gallium/state_trackers/egl/x11/native_x11.c
src/gallium/state_trackers/egl/x11/native_x11.h
src/gallium/state_trackers/xorg/xorg_driver.c
src/gallium/winsys/radeon/drm/radeon_drm.c
Diffstat (limited to 'src/gallium/drivers/i965')
-rw-r--r-- | src/gallium/drivers/i965/brw_public.h | 13 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_screen.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_winsys.h | 7 |
3 files changed, 19 insertions, 10 deletions
diff --git a/src/gallium/drivers/i965/brw_public.h b/src/gallium/drivers/i965/brw_public.h new file mode 100644 index 00000000000..be2cd6b5c4d --- /dev/null +++ b/src/gallium/drivers/i965/brw_public.h @@ -0,0 +1,13 @@ + +#ifndef BRW_PUBLIC_H +#define BRW_PUBLIC_H + +struct brw_winsys_screen; +struct pipe_screen; + +/** + * Create brw AKA i965 pipe_screen. + */ +struct pipe_screen * brw_screen_create(struct brw_winsys_screen *bws); + +#endif diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c index 50a446db917..bdfead73cc8 100644 --- a/src/gallium/drivers/i965/brw_screen.c +++ b/src/gallium/drivers/i965/brw_screen.c @@ -34,6 +34,7 @@ #include "brw_context.h" #include "brw_screen.h" #include "brw_winsys.h" +#include "brw_public.h" #include "brw_debug.h" #include "brw_resource.h" @@ -350,7 +351,7 @@ brw_destroy_screen(struct pipe_screen *screen) * Create a new brw_screen object */ struct pipe_screen * -brw_create_screen(struct brw_winsys_screen *sws, uint pci_id) +brw_screen_create(struct brw_winsys_screen *sws) { struct brw_screen *bscreen; struct brw_chipset chipset; @@ -365,9 +366,9 @@ brw_create_screen(struct brw_winsys_screen *sws, uint pci_id) memset(&chipset, 0, sizeof chipset); - chipset.pci_id = pci_id; + chipset.pci_id = sws->pci_id; - switch (pci_id) { + switch (chipset.pci_id) { case PCI_CHIP_I965_G: case PCI_CHIP_I965_Q: case PCI_CHIP_I965_G_1: @@ -393,7 +394,7 @@ brw_create_screen(struct brw_winsys_screen *sws, uint pci_id) default: debug_printf("%s: unknown pci id 0x%x, cannot create screen\n", - __FUNCTION__, pci_id); + __FUNCTION__, chipset.pci_id); return NULL; } diff --git a/src/gallium/drivers/i965/brw_winsys.h b/src/gallium/drivers/i965/brw_winsys.h index f30c7f18132..a06f8bb7d61 100644 --- a/src/gallium/drivers/i965/brw_winsys.h +++ b/src/gallium/drivers/i965/brw_winsys.h @@ -147,6 +147,7 @@ static INLINE void make_reloc(struct brw_winsys_reloc *reloc, struct brw_winsys_screen { + unsigned pci_id; /** * Buffer functions. @@ -261,12 +262,6 @@ bo_reference(struct brw_winsys_buffer **ptr, struct brw_winsys_buffer *buf) } -/** - * Create brw pipe_screen. - */ -struct pipe_screen *brw_create_screen(struct brw_winsys_screen *iws, unsigned pci_id); - - /************************************************************************* * Cooperative dumping between winsys and driver. TODO: make this |