Remove screenConfigs from __DRIscreen.
authorKristian Høgsberg <krh@hinata.boston.redhat.com>
Fri, 11 May 2007 20:11:23 +0000 (16:11 -0400)
committerKristian Høgsberg <krh@redhat.com>
Wed, 10 Oct 2007 22:00:13 +0000 (18:00 -0400)
commitaac367f48afc62176faf67aa6f329fbeae2004b4
tree9afce18cf316c930ca764e27caeadb2b0fb2f0be
parentfa72013adaab4d0755e852805e2e44d1a879a204
Remove screenConfigs from __DRIscreen.

The screenConfigs field of __DRIscreen points back to the containing
__GLXscreenConfigs struct.  This is a serious abstraction violation; it
assumes that the loader is libGL and that there *is* a __GLXscreenConfigs
type in the loader.

Using the containerOf macro, we can get from the __DRIscreen pointer to
the containing __GLXscreenConfigs struct, at a place in the stack
where the above is a valid assumption.  Besides, the __DRI* structs shouldn't
hold state other than the private pointer.
13 files changed:
include/GL/internal/dri_interface.h
src/glx/x11/glxext.c
src/glx/x11/glxextensions.c
src/glx/x11/glxextensions.h
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/mach64/mach64_screen.c
src/mesa/drivers/dri/mga/mga_xmesa.c
src/mesa/drivers/dri/r128/r128_screen.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/savage/savage_xmesa.c
src/mesa/drivers/dri/tdfx/tdfx_screen.c
src/mesa/drivers/dri/unichrome/via_screen.c