From ccf1910dd4b2a8ccd04ddbdf725b6dd3f8026eee Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Sun, 17 Aug 2008 20:17:18 +0100 Subject: [PATCH] consolidate intel directories. we now have src/gallium/winsys/drm/intel/{common,dri,egl} --- configs/default | 1 - configs/linux-dri | 3 +- src/gallium/winsys/SConscript | 4 +- src/gallium/winsys/{dri => drm}/Makefile | 0 .../winsys/{dri => drm}/Makefile.template | 0 src/gallium/winsys/{dri => drm}/SConscript | 0 .../winsys/{common => drm/intel}/Makefile | 9 +- .../intel_drm => drm/intel/common}/Makefile | 4 +- .../{ => drm/intel}/common/Makefile.template | 2 +- .../intel_drm => drm/intel/common}/glthread.h | 0 .../intel/common}/intel_be_batchbuffer.c | 0 .../intel/common}/intel_be_batchbuffer.h | 0 .../intel/common}/intel_be_context.c | 0 .../intel/common}/intel_be_context.h | 0 .../intel/common}/intel_be_device.c | 0 .../intel/common}/intel_be_device.h | 0 .../intel/common}/ws_dri_bufmgr.c | 0 .../intel/common}/ws_dri_bufmgr.h | 0 .../intel/common}/ws_dri_bufpool.h | 0 .../intel/common}/ws_dri_drmpool.c | 0 .../intel/common}/ws_dri_fencemgr.c | 0 .../intel/common}/ws_dri_fencemgr.h | 0 .../intel/common}/ws_dri_mallocpool.c | 0 .../intel/common}/ws_dri_slabpool.c | 0 .../{dri/intel => drm/intel/dri}/Makefile | 9 +- .../{dri/intel => drm/intel/dri}/SConscript | 0 .../intel/dri}/intel_batchbuffer.h | 2 +- .../intel => drm/intel/dri}/intel_context.c | 0 .../intel => drm/intel/dri}/intel_context.h | 2 +- .../{dri/intel => drm/intel/dri}/intel_lock.c | 0 .../{dri/intel => drm/intel/dri}/intel_reg.h | 0 .../intel => drm/intel/dri}/intel_screen.c | 2 +- .../intel => drm/intel/dri}/intel_screen.h | 4 +- .../intel/dri}/intel_swapbuffers.c | 2 +- .../intel/dri}/intel_swapbuffers.h | 0 .../intel/dri}/intel_winsys_softpipe.c | 0 .../intel/dri}/intel_winsys_softpipe.h | 0 .../intel/dri}/server/i830_common.h | 0 .../intel => drm/intel/dri}/server/i830_dri.h | 0 .../{egl_drm/intel => drm/intel/egl}/Makefile | 9 +- .../intel => drm/intel/egl}/SConscript | 0 .../intel/egl}/intel_batchbuffer.h | 2 +- .../intel => drm/intel/egl}/intel_context.c | 0 .../intel => drm/intel/egl}/intel_context.h | 2 +- .../intel => drm/intel/egl}/intel_device.c | 0 .../intel => drm/intel/egl}/intel_device.h | 2 +- .../intel => drm/intel/egl}/intel_egl.c | 2 +- .../intel => drm/intel/egl}/intel_egl.h | 0 .../intel => drm/intel/egl}/intel_reg.h | 0 .../intel/egl}/intel_swapbuffers.c | 0 src/gallium/winsys/egl_drm/Makefile | 38 ------ src/gallium/winsys/egl_drm/Makefile.template | 117 ------------------ src/gallium/winsys/gdi/wmesa.c | 70 ----------- 53 files changed, 31 insertions(+), 255 deletions(-) rename src/gallium/winsys/{dri => drm}/Makefile (100%) rename src/gallium/winsys/{dri => drm}/Makefile.template (100%) rename src/gallium/winsys/{dri => drm}/SConscript (100%) rename src/gallium/winsys/{common => drm/intel}/Makefile (66%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/Makefile (89%) rename src/gallium/winsys/{ => drm/intel}/common/Makefile.template (93%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/glthread.h (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/intel_be_batchbuffer.c (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/intel_be_batchbuffer.h (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/intel_be_context.c (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/intel_be_context.h (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/intel_be_device.c (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/intel_be_device.h (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_bufmgr.c (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_bufmgr.h (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_bufpool.h (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_drmpool.c (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_fencemgr.c (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_fencemgr.h (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_mallocpool.c (100%) rename src/gallium/winsys/{common/intel_drm => drm/intel/common}/ws_dri_slabpool.c (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/Makefile (71%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/SConscript (100%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/dri}/intel_batchbuffer.h (92%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_context.c (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_context.h (98%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_lock.c (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_reg.h (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_screen.c (99%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_screen.h (97%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_swapbuffers.c (99%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_swapbuffers.h (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_winsys_softpipe.c (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/intel_winsys_softpipe.h (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/server/i830_common.h (100%) rename src/gallium/winsys/{dri/intel => drm/intel/dri}/server/i830_dri.h (100%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/Makefile (66%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/SConscript (100%) rename src/gallium/winsys/{dri/intel => drm/intel/egl}/intel_batchbuffer.h (92%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_context.c (100%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_context.h (98%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_device.c (100%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_device.h (97%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_egl.c (99%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_egl.h (100%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_reg.h (100%) rename src/gallium/winsys/{egl_drm/intel => drm/intel/egl}/intel_swapbuffers.c (100%) delete mode 100644 src/gallium/winsys/egl_drm/Makefile delete mode 100644 src/gallium/winsys/egl_drm/Makefile.template diff --git a/configs/default b/configs/default index 2d14b8aef74..cd2c39c3650 100644 --- a/configs/default +++ b/configs/default @@ -73,7 +73,6 @@ EGL_DRIVERS_DIRS = demo GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple failover -GALLIUM_WINSYS_COMMON_DIRS = GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) GALLIUM_WINSYS_DIRS = xlib egl_xlib diff --git a/configs/linux-dri b/configs/linux-dri index 7613d41ea19..d441194b08c 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -55,8 +55,7 @@ EGL_DRIVERS_DIRS = demo dri xdri DRIVER_DIRS = WINDOW_SYSTEM = dri -GALLIUM_WINSYS_DIRS = dri egl_xlib -GALLIUM_WINSYS_COMMON_DIRS = intel_drm +GALLIUM_WINSYS_DIRS = drm egl_xlib # gamma are missing because they have not been converted to use the new # interface. diff --git a/src/gallium/winsys/SConscript b/src/gallium/winsys/SConscript index bf1718e7a57..ddab9efc86e 100644 --- a/src/gallium/winsys/SConscript +++ b/src/gallium/winsys/SConscript @@ -1,8 +1,8 @@ Import('*') -if env['dri']: +if env['drm']: SConscript([ - 'dri/SConscript', + 'drm/SConscript', ]) if 'xlib' in env['winsys']: diff --git a/src/gallium/winsys/dri/Makefile b/src/gallium/winsys/drm/Makefile similarity index 100% rename from src/gallium/winsys/dri/Makefile rename to src/gallium/winsys/drm/Makefile diff --git a/src/gallium/winsys/dri/Makefile.template b/src/gallium/winsys/drm/Makefile.template similarity index 100% rename from src/gallium/winsys/dri/Makefile.template rename to src/gallium/winsys/drm/Makefile.template diff --git a/src/gallium/winsys/dri/SConscript b/src/gallium/winsys/drm/SConscript similarity index 100% rename from src/gallium/winsys/dri/SConscript rename to src/gallium/winsys/drm/SConscript diff --git a/src/gallium/winsys/common/Makefile b/src/gallium/winsys/drm/intel/Makefile similarity index 66% rename from src/gallium/winsys/common/Makefile rename to src/gallium/winsys/drm/intel/Makefile index 4c0f3545a53..a670ac044d0 100644 --- a/src/gallium/winsys/common/Makefile +++ b/src/gallium/winsys/drm/intel/Makefile @@ -1,8 +1,8 @@ -TOP = ../../../.. +TOP = ../../../../.. include $(TOP)/configs/current -SUBDIRS = $(GALLIUM_WINSYS_COMMON_DIRS) +SUBDIRS = common dri egl default: subdirs @@ -18,3 +18,8 @@ subdirs: clean: rm -f `find . -name \*.[oa]` + rm -f `find . -name depend` + + +# Dummy install target +install: diff --git a/src/gallium/winsys/common/intel_drm/Makefile b/src/gallium/winsys/drm/intel/common/Makefile similarity index 89% rename from src/gallium/winsys/common/intel_drm/Makefile rename to src/gallium/winsys/drm/intel/common/Makefile index 913dbeff205..bf1a7d691f0 100644 --- a/src/gallium/winsys/common/intel_drm/Makefile +++ b/src/gallium/winsys/drm/intel/common/Makefile @@ -1,4 +1,4 @@ -TOP = ../../../../.. +TOP = ../../../../../.. include $(TOP)/configs/current LIBNAME = inteldrm @@ -14,7 +14,7 @@ C_SOURCES = \ ws_dri_slabpool.c -include ../Makefile.template +include ./Makefile.template DRIVER_DEFINES = $(shell pkg-config libdrm --cflags \ && pkg-config libdrm --atleast-version=2.3.1 \ diff --git a/src/gallium/winsys/common/Makefile.template b/src/gallium/winsys/drm/intel/common/Makefile.template similarity index 93% rename from src/gallium/winsys/common/Makefile.template rename to src/gallium/winsys/drm/intel/common/Makefile.template index 67af7781570..02ed363a435 100644 --- a/src/gallium/winsys/common/Makefile.template +++ b/src/gallium/winsys/drm/intel/common/Makefile.template @@ -39,7 +39,7 @@ INCLUDES = \ default: depend symlinks $(LIBNAME) -$(LIBNAME): $(OBJECTS) Makefile $(TOP)/src/gallium/winsys/common/Makefile.template +$(LIBNAME): $(OBJECTS) Makefile Makefile.template $(TOP)/bin/mklib -o $@ -static $(OBJECTS) $(DRIVER_LIBS) diff --git a/src/gallium/winsys/common/intel_drm/glthread.h b/src/gallium/winsys/drm/intel/common/glthread.h similarity index 100% rename from src/gallium/winsys/common/intel_drm/glthread.h rename to src/gallium/winsys/drm/intel/common/glthread.h diff --git a/src/gallium/winsys/common/intel_drm/intel_be_batchbuffer.c b/src/gallium/winsys/drm/intel/common/intel_be_batchbuffer.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/intel_be_batchbuffer.c rename to src/gallium/winsys/drm/intel/common/intel_be_batchbuffer.c diff --git a/src/gallium/winsys/common/intel_drm/intel_be_batchbuffer.h b/src/gallium/winsys/drm/intel/common/intel_be_batchbuffer.h similarity index 100% rename from src/gallium/winsys/common/intel_drm/intel_be_batchbuffer.h rename to src/gallium/winsys/drm/intel/common/intel_be_batchbuffer.h diff --git a/src/gallium/winsys/common/intel_drm/intel_be_context.c b/src/gallium/winsys/drm/intel/common/intel_be_context.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/intel_be_context.c rename to src/gallium/winsys/drm/intel/common/intel_be_context.c diff --git a/src/gallium/winsys/common/intel_drm/intel_be_context.h b/src/gallium/winsys/drm/intel/common/intel_be_context.h similarity index 100% rename from src/gallium/winsys/common/intel_drm/intel_be_context.h rename to src/gallium/winsys/drm/intel/common/intel_be_context.h diff --git a/src/gallium/winsys/common/intel_drm/intel_be_device.c b/src/gallium/winsys/drm/intel/common/intel_be_device.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/intel_be_device.c rename to src/gallium/winsys/drm/intel/common/intel_be_device.c diff --git a/src/gallium/winsys/common/intel_drm/intel_be_device.h b/src/gallium/winsys/drm/intel/common/intel_be_device.h similarity index 100% rename from src/gallium/winsys/common/intel_drm/intel_be_device.h rename to src/gallium/winsys/drm/intel/common/intel_be_device.h diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_bufmgr.c b/src/gallium/winsys/drm/intel/common/ws_dri_bufmgr.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_bufmgr.c rename to src/gallium/winsys/drm/intel/common/ws_dri_bufmgr.c diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_bufmgr.h b/src/gallium/winsys/drm/intel/common/ws_dri_bufmgr.h similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_bufmgr.h rename to src/gallium/winsys/drm/intel/common/ws_dri_bufmgr.h diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_bufpool.h b/src/gallium/winsys/drm/intel/common/ws_dri_bufpool.h similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_bufpool.h rename to src/gallium/winsys/drm/intel/common/ws_dri_bufpool.h diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_drmpool.c b/src/gallium/winsys/drm/intel/common/ws_dri_drmpool.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_drmpool.c rename to src/gallium/winsys/drm/intel/common/ws_dri_drmpool.c diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_fencemgr.c b/src/gallium/winsys/drm/intel/common/ws_dri_fencemgr.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_fencemgr.c rename to src/gallium/winsys/drm/intel/common/ws_dri_fencemgr.c diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_fencemgr.h b/src/gallium/winsys/drm/intel/common/ws_dri_fencemgr.h similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_fencemgr.h rename to src/gallium/winsys/drm/intel/common/ws_dri_fencemgr.h diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_mallocpool.c b/src/gallium/winsys/drm/intel/common/ws_dri_mallocpool.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_mallocpool.c rename to src/gallium/winsys/drm/intel/common/ws_dri_mallocpool.c diff --git a/src/gallium/winsys/common/intel_drm/ws_dri_slabpool.c b/src/gallium/winsys/drm/intel/common/ws_dri_slabpool.c similarity index 100% rename from src/gallium/winsys/common/intel_drm/ws_dri_slabpool.c rename to src/gallium/winsys/drm/intel/common/ws_dri_slabpool.c diff --git a/src/gallium/winsys/dri/intel/Makefile b/src/gallium/winsys/drm/intel/dri/Makefile similarity index 71% rename from src/gallium/winsys/dri/intel/Makefile rename to src/gallium/winsys/drm/intel/dri/Makefile index e0716ea28ea..2046441a220 100644 --- a/src/gallium/winsys/dri/intel/Makefile +++ b/src/gallium/winsys/drm/intel/dri/Makefile @@ -1,5 +1,4 @@ - -TOP = ../../../../.. +TOP = ../../../../../.. include $(TOP)/configs/current LIBNAME = i915_dri.so @@ -7,7 +6,7 @@ LIBNAME_EGL = egl_i915_dri.so PIPE_DRIVERS = \ $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ - $(TOP)/src/gallium/winsys/common/intel_drm/libinteldrm.a \ + ../common/libinteldrm.a \ $(TOP)/src/gallium/drivers/i915simple/libi915simple.a @@ -24,10 +23,10 @@ C_SOURCES = \ ASM_SOURCES = -DRIVER_DEFINES = -I$(TOP)/src/mesa/drivers/dri/intel $(shell pkg-config libdrm --atleast-version=2.3.1 \ +DRIVER_DEFINES = -I../common $(shell pkg-config libdrm --atleast-version=2.3.1 \ && echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP") -include ../Makefile.template +include ../../Makefile.template #intel_tex_layout.o: $(TOP)/src/mesa/drivers/dri/intel/intel_tex_layout.c diff --git a/src/gallium/winsys/dri/intel/SConscript b/src/gallium/winsys/drm/intel/dri/SConscript similarity index 100% rename from src/gallium/winsys/dri/intel/SConscript rename to src/gallium/winsys/drm/intel/dri/SConscript diff --git a/src/gallium/winsys/egl_drm/intel/intel_batchbuffer.h b/src/gallium/winsys/drm/intel/dri/intel_batchbuffer.h similarity index 92% rename from src/gallium/winsys/egl_drm/intel/intel_batchbuffer.h rename to src/gallium/winsys/drm/intel/dri/intel_batchbuffer.h index 1fa27198458..3e953261689 100644 --- a/src/gallium/winsys/egl_drm/intel/intel_batchbuffer.h +++ b/src/gallium/winsys/drm/intel/dri/intel_batchbuffer.h @@ -1,7 +1,7 @@ #ifndef INTEL_BATCHBUFFER_H #define INTEL_BATCHBUFFER_H -#include "intel_drm/intel_be_batchbuffer.h" +#include "intel_be_batchbuffer.h" /* * Need to redefine the BATCH defines diff --git a/src/gallium/winsys/dri/intel/intel_context.c b/src/gallium/winsys/drm/intel/dri/intel_context.c similarity index 100% rename from src/gallium/winsys/dri/intel/intel_context.c rename to src/gallium/winsys/drm/intel/dri/intel_context.c diff --git a/src/gallium/winsys/dri/intel/intel_context.h b/src/gallium/winsys/drm/intel/dri/intel_context.h similarity index 98% rename from src/gallium/winsys/dri/intel/intel_context.h rename to src/gallium/winsys/drm/intel/dri/intel_context.h index ced18da1433..5d22a422af9 100644 --- a/src/gallium/winsys/dri/intel/intel_context.h +++ b/src/gallium/winsys/drm/intel/dri/intel_context.h @@ -36,7 +36,7 @@ #include "intel_screen.h" #include "i915_drm.h" -#include "intel_drm/intel_be_context.h" +#include "intel_be_context.h" struct pipe_context; diff --git a/src/gallium/winsys/dri/intel/intel_lock.c b/src/gallium/winsys/drm/intel/dri/intel_lock.c similarity index 100% rename from src/gallium/winsys/dri/intel/intel_lock.c rename to src/gallium/winsys/drm/intel/dri/intel_lock.c diff --git a/src/gallium/winsys/dri/intel/intel_reg.h b/src/gallium/winsys/drm/intel/dri/intel_reg.h similarity index 100% rename from src/gallium/winsys/dri/intel/intel_reg.h rename to src/gallium/winsys/drm/intel/dri/intel_reg.h diff --git a/src/gallium/winsys/dri/intel/intel_screen.c b/src/gallium/winsys/drm/intel/dri/intel_screen.c similarity index 99% rename from src/gallium/winsys/dri/intel/intel_screen.c rename to src/gallium/winsys/drm/intel/dri/intel_screen.c index b3022fd17a9..46d4861e77c 100644 --- a/src/gallium/winsys/dri/intel/intel_screen.c +++ b/src/gallium/winsys/drm/intel/dri/intel_screen.c @@ -35,7 +35,7 @@ #include "intel_swapbuffers.h" #include "i830_dri.h" -#include "intel_drm/ws_dri_bufpool.h" +#include "ws_dri_bufpool.h" #include "pipe/p_context.h" #include "pipe/p_screen.h" diff --git a/src/gallium/winsys/dri/intel/intel_screen.h b/src/gallium/winsys/drm/intel/dri/intel_screen.h similarity index 97% rename from src/gallium/winsys/dri/intel/intel_screen.h rename to src/gallium/winsys/drm/intel/dri/intel_screen.h index e62f9e71eca..0bb43a915cd 100644 --- a/src/gallium/winsys/dri/intel/intel_screen.h +++ b/src/gallium/winsys/drm/intel/dri/intel_screen.h @@ -31,11 +31,11 @@ #include "dri_util.h" #include "i830_common.h" #include "xmlconfig.h" -#include "intel_drm/ws_dri_bufpool.h" +#include "ws_dri_bufpool.h" #include "pipe/p_compiler.h" -#include "intel_drm/intel_be_device.h" +#include "intel_be_device.h" struct intel_screen { diff --git a/src/gallium/winsys/dri/intel/intel_swapbuffers.c b/src/gallium/winsys/drm/intel/dri/intel_swapbuffers.c similarity index 99% rename from src/gallium/winsys/dri/intel/intel_swapbuffers.c rename to src/gallium/winsys/drm/intel/dri/intel_swapbuffers.c index f751f975245..8a18bfd9a43 100644 --- a/src/gallium/winsys/dri/intel/intel_swapbuffers.c +++ b/src/gallium/winsys/drm/intel/dri/intel_swapbuffers.c @@ -36,7 +36,7 @@ #include "state_tracker/st_context.h" #include "state_tracker/st_cb_fbo.h" -#include "intel_drm/ws_dri_bufmgr.h" +#include "ws_dri_bufmgr.h" #include "intel_batchbuffer.h" /** diff --git a/src/gallium/winsys/dri/intel/intel_swapbuffers.h b/src/gallium/winsys/drm/intel/dri/intel_swapbuffers.h similarity index 100% rename from src/gallium/winsys/dri/intel/intel_swapbuffers.h rename to src/gallium/winsys/drm/intel/dri/intel_swapbuffers.h diff --git a/src/gallium/winsys/dri/intel/intel_winsys_softpipe.c b/src/gallium/winsys/drm/intel/dri/intel_winsys_softpipe.c similarity index 100% rename from src/gallium/winsys/dri/intel/intel_winsys_softpipe.c rename to src/gallium/winsys/drm/intel/dri/intel_winsys_softpipe.c diff --git a/src/gallium/winsys/dri/intel/intel_winsys_softpipe.h b/src/gallium/winsys/drm/intel/dri/intel_winsys_softpipe.h similarity index 100% rename from src/gallium/winsys/dri/intel/intel_winsys_softpipe.h rename to src/gallium/winsys/drm/intel/dri/intel_winsys_softpipe.h diff --git a/src/gallium/winsys/dri/intel/server/i830_common.h b/src/gallium/winsys/drm/intel/dri/server/i830_common.h similarity index 100% rename from src/gallium/winsys/dri/intel/server/i830_common.h rename to src/gallium/winsys/drm/intel/dri/server/i830_common.h diff --git a/src/gallium/winsys/dri/intel/server/i830_dri.h b/src/gallium/winsys/drm/intel/dri/server/i830_dri.h similarity index 100% rename from src/gallium/winsys/dri/intel/server/i830_dri.h rename to src/gallium/winsys/drm/intel/dri/server/i830_dri.h diff --git a/src/gallium/winsys/egl_drm/intel/Makefile b/src/gallium/winsys/drm/intel/egl/Makefile similarity index 66% rename from src/gallium/winsys/egl_drm/intel/Makefile rename to src/gallium/winsys/drm/intel/egl/Makefile index e67b49f3ada..f0b5a443894 100644 --- a/src/gallium/winsys/egl_drm/intel/Makefile +++ b/src/gallium/winsys/drm/intel/egl/Makefile @@ -1,5 +1,4 @@ - -TOP = ../../../../.. +TOP = ../../../../../.. include $(TOP)/configs/current LIBNAME = EGL_i915.so @@ -7,7 +6,7 @@ LIBNAME = EGL_i915.so PIPE_DRIVERS = \ $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ $(TOP)/src/gallium/drivers/i915simple/libi915simple.a \ - $(TOP)/src/gallium/winsys/common/intel_drm/libinteldrm.a + ../common/libinteldrm.a DRIVER_SOURCES = \ intel_swapbuffers.c \ @@ -21,9 +20,9 @@ C_SOURCES = \ ASM_SOURCES = -DRIVER_DEFINES = -I$(TOP)/src/mesa/drivers/dri/intel $(shell pkg-config libdrm --atleast-version=2.3.1 \ +DRIVER_DEFINES = -I../common $(shell pkg-config libdrm --atleast-version=2.3.1 \ && echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP") -include ../Makefile.template +include ../../Makefile.template symlinks: diff --git a/src/gallium/winsys/egl_drm/intel/SConscript b/src/gallium/winsys/drm/intel/egl/SConscript similarity index 100% rename from src/gallium/winsys/egl_drm/intel/SConscript rename to src/gallium/winsys/drm/intel/egl/SConscript diff --git a/src/gallium/winsys/dri/intel/intel_batchbuffer.h b/src/gallium/winsys/drm/intel/egl/intel_batchbuffer.h similarity index 92% rename from src/gallium/winsys/dri/intel/intel_batchbuffer.h rename to src/gallium/winsys/drm/intel/egl/intel_batchbuffer.h index 1fa27198458..3e953261689 100644 --- a/src/gallium/winsys/dri/intel/intel_batchbuffer.h +++ b/src/gallium/winsys/drm/intel/egl/intel_batchbuffer.h @@ -1,7 +1,7 @@ #ifndef INTEL_BATCHBUFFER_H #define INTEL_BATCHBUFFER_H -#include "intel_drm/intel_be_batchbuffer.h" +#include "intel_be_batchbuffer.h" /* * Need to redefine the BATCH defines diff --git a/src/gallium/winsys/egl_drm/intel/intel_context.c b/src/gallium/winsys/drm/intel/egl/intel_context.c similarity index 100% rename from src/gallium/winsys/egl_drm/intel/intel_context.c rename to src/gallium/winsys/drm/intel/egl/intel_context.c diff --git a/src/gallium/winsys/egl_drm/intel/intel_context.h b/src/gallium/winsys/drm/intel/egl/intel_context.h similarity index 98% rename from src/gallium/winsys/egl_drm/intel/intel_context.h rename to src/gallium/winsys/drm/intel/egl/intel_context.h index dfa4720b081..477fdec7f70 100644 --- a/src/gallium/winsys/egl_drm/intel/intel_context.h +++ b/src/gallium/winsys/drm/intel/egl/intel_context.h @@ -29,7 +29,7 @@ #define INTEL_CONTEXT_H #include "pipe/p_debug.h" -#include "intel_drm/intel_be_context.h" +#include "intel_be_context.h" struct st_context; diff --git a/src/gallium/winsys/egl_drm/intel/intel_device.c b/src/gallium/winsys/drm/intel/egl/intel_device.c similarity index 100% rename from src/gallium/winsys/egl_drm/intel/intel_device.c rename to src/gallium/winsys/drm/intel/egl/intel_device.c diff --git a/src/gallium/winsys/egl_drm/intel/intel_device.h b/src/gallium/winsys/drm/intel/egl/intel_device.h similarity index 97% rename from src/gallium/winsys/egl_drm/intel/intel_device.h rename to src/gallium/winsys/drm/intel/egl/intel_device.h index 2f9d4f887e5..323a7c2aef7 100644 --- a/src/gallium/winsys/egl_drm/intel/intel_device.h +++ b/src/gallium/winsys/drm/intel/egl/intel_device.h @@ -28,7 +28,7 @@ #ifndef _INTEL_SCREEN_H_ #define _INTEL_SCREEN_H_ -#include "intel_drm/intel_be_device.h" +#include "intel_be_device.h" #include "pipe/p_compiler.h" diff --git a/src/gallium/winsys/egl_drm/intel/intel_egl.c b/src/gallium/winsys/drm/intel/egl/intel_egl.c similarity index 99% rename from src/gallium/winsys/egl_drm/intel/intel_egl.c rename to src/gallium/winsys/drm/intel/egl/intel_egl.c index 1851babaf6c..b89c5c508ac 100644 --- a/src/gallium/winsys/egl_drm/intel/intel_egl.c +++ b/src/gallium/winsys/drm/intel/egl/intel_egl.c @@ -367,7 +367,7 @@ visual_from_config(_EGLConfig *conf) __GLcontextModes *visual; (void)conf; - visual = _gl_context_modes_create(1, sizeof(*visual)); + visual = _egl_context_modes_create(1, sizeof(*visual)); visual->redBits = 8; visual->greenBits = 8; visual->blueBits = 8; diff --git a/src/gallium/winsys/egl_drm/intel/intel_egl.h b/src/gallium/winsys/drm/intel/egl/intel_egl.h similarity index 100% rename from src/gallium/winsys/egl_drm/intel/intel_egl.h rename to src/gallium/winsys/drm/intel/egl/intel_egl.h diff --git a/src/gallium/winsys/egl_drm/intel/intel_reg.h b/src/gallium/winsys/drm/intel/egl/intel_reg.h similarity index 100% rename from src/gallium/winsys/egl_drm/intel/intel_reg.h rename to src/gallium/winsys/drm/intel/egl/intel_reg.h diff --git a/src/gallium/winsys/egl_drm/intel/intel_swapbuffers.c b/src/gallium/winsys/drm/intel/egl/intel_swapbuffers.c similarity index 100% rename from src/gallium/winsys/egl_drm/intel/intel_swapbuffers.c rename to src/gallium/winsys/drm/intel/egl/intel_swapbuffers.c diff --git a/src/gallium/winsys/egl_drm/Makefile b/src/gallium/winsys/egl_drm/Makefile deleted file mode 100644 index 4139d9e71f0..00000000000 --- a/src/gallium/winsys/egl_drm/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# src/mesa/drivers/egl_drm/Makefile - -TOP = ../../../.. - -include $(TOP)/configs/current - - - -default: $(TOP)/$(LIB_DIR) subdirs - - -$(TOP)/$(LIB_DIR): - -mkdir $(TOP)/$(LIB_DIR) - - -subdirs: - @for dir in $(DRI_DIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE)) || exit 1 ; \ - fi \ - done - - -install: - @for dir in $(DRI_DIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) install) || exit 1 ; \ - fi \ - done - - -clean: - @for dir in $(DRI_DIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) clean) ; \ - fi \ - done - -rm -f common/*.o diff --git a/src/gallium/winsys/egl_drm/Makefile.template b/src/gallium/winsys/egl_drm/Makefile.template deleted file mode 100644 index 07abfa53f38..00000000000 --- a/src/gallium/winsys/egl_drm/Makefile.template +++ /dev/null @@ -1,117 +0,0 @@ -# -*-makefile-*- - -MESA_MODULES = \ - $(TOP)/src/mesa/libmesa.a \ - $(GALLIUM_AUXILIARIES) - -COMMON_GALLIUM_SOURCES = \ - $(TOP)/src/mesa/drivers/dri/common/utils.c \ - $(TOP)/src/mesa/drivers/dri/common/vblank.c \ - $(TOP)/src/mesa/drivers/dri/common/dri_util.c \ - $(TOP)/src/mesa/drivers/dri/common/xmlconfig.c - -COMMON_SOURCES = $(COMMON_GALLIUM_SOURCES) \ - $(TOP)/src/mesa/drivers/common/driverfuncs.c \ - $(TOP)/src/mesa/drivers/dri/common/texmem.c \ - $(TOP)/src/mesa/drivers/dri/common/drirenderbuffer.c - -COMMON_BM_SOURCES = \ - $(TOP)/src/mesa/drivers/dri/common/dri_bufmgr.c \ - $(TOP)/src/mesa/drivers/dri/common/dri_drmpool.c - - -ifeq ($(WINDOW_SYSTEM),dri) -WINOBJ= -WINLIB= -INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES) - -OBJECTS = \ - $(C_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) - -else -# miniglx -WINOBJ= -WINLIB=-L$(MESA)/src/glx/mini -MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini -INCLUDES = $(MINIGLX_INCLUDES) \ - $(SHARED_INCLUDES) \ - $(PCIACCESS_CFLAGS) - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(MINIGLX_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) -endif - - -### Include directories -SHARED_INCLUDES = \ - -I. \ - -I$(TOP)/src/mesa/drivers/dri/common \ - -Iserver \ - -I$(TOP)/include \ - -I$(TOP)/include/GL/internal \ - -I$(TOP)/src/gallium/include \ - -I$(TOP)/src/gallium/auxiliary \ - -I$(TOP)/src/gallium/drivers \ - -I$(TOP)/src/gallium/winsys/common \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/math \ - -I$(TOP)/src/mesa/transform \ - -I$(TOP)/src/mesa/shader \ - -I$(TOP)/src/mesa/swrast \ - -I$(TOP)/src/mesa/swrast_setup \ - -I$(TOP)/src/egl/main \ - -I$(TOP)/src/egl/drivers/dri \ - $(LIBDRM_CFLAGS) - - -##### RULES ##### - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ - - -##### TARGETS ##### - -default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME) - - -$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template - $(TOP)/bin/mklib -noprefix -o $@ \ - $(OBJECTS) $(PIPE_DRIVERS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS) - - -$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME) - $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR) - - -depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS) - rm -f depend - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \ - $(ASM_SOURCES) 2> /dev/null - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -# Remove .o and backup files -clean: - -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS) - -rm -f depend depend.bak - - -install: $(LIBNAME) - $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR) - $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR) - - -include depend diff --git a/src/gallium/winsys/gdi/wmesa.c b/src/gallium/winsys/gdi/wmesa.c index 86b085ab841..ff52ceb8c41 100644 --- a/src/gallium/winsys/gdi/wmesa.c +++ b/src/gallium/winsys/gdi/wmesa.c @@ -118,48 +118,6 @@ static void wmSetPixelFormat(WMesaFramebuffer pwfb, HDC hDC) } } - -/** - * Create DIB for back buffer. - * We write into this memory with the span routines and then blit it - * to the window on a buffer swap. - */ -BOOL wmCreateBackingStore(WMesaFramebuffer pwfb, long lxSize, long lySize) -{ - HDC hdc = pwfb->hDC; - BITMAPINFO bmi; - LPBITMAPINFO pbmi = &bmi; - HDC hic; - - pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - pbmi->bmiHeader.biWidth = lxSize; - pbmi->bmiHeader.biHeight= -lySize; - pbmi->bmiHeader.biPlanes = 1; - pbmi->bmiHeader.biBitCount = pwfb->cColorBits; - pbmi->bmiHeader.biCompression = BI_RGB; - pbmi->bmiHeader.biSizeImage = 0; - pbmi->bmiHeader.biXPelsPerMeter = 0; - pbmi->bmiHeader.biYPelsPerMeter = 0; - pbmi->bmiHeader.biClrUsed = 0; - pbmi->bmiHeader.biClrImportant = 0; - - hic = CreateIC("display", NULL, NULL, NULL); - pwfb->dib_hDC = CreateCompatibleDC(hic); - - pwfb->hbmDIB = CreateDIBSection(hic, - pbmi, - DIB_RGB_COLORS, - (void **)&(pwfb->pbPixels), - 0, - 0); - pwfb->hOldBitmap = SelectObject(pwfb->dib_hDC, pwfb->hbmDIB); - - DeleteDC(hic); - - wmSetPixelFormat(pwfb, pwfb->hDC); - return TRUE; -} - /** * Create a new WMesaFramebuffer object which will correspond to the * given HDC (Window handle). @@ -201,10 +159,6 @@ wmesa_new_framebuffer(HDC hdc, GLvisual *visual, GLuint width, GLuint height) pwfb->cColorBits = GetDeviceCaps(hdc, BITSPIXEL); -#if 0 - wmCreateBackingStore(pwfb, width, height); -#endif - pwfb->hDC = hdc; /* insert at head of list */ pwfb->next = FirstFramebuffer; @@ -266,16 +220,6 @@ static WMesaContext wmesa_context(const GLcontext *ctx) return (WMesaContext) ctx; } -static wmDeleteBackingStore(WMesaFramebuffer pwfb) -{ - if (pwfb->hbmDIB) { - SelectObject(pwfb->dib_hDC, pwfb->hOldBitmap); - DeleteDC(pwfb->dib_hDC); - DeleteObject(pwfb->hbmDIB); - } -} - - /** * Find the width and height of the window named by hdc. */ @@ -383,11 +327,6 @@ wm_flush_frontbuffer(struct pipe_winsys *pws, struct wm_buffer *wm_buf; BITMAPINFO bmi, *pbmi; -#if 0 - if (pwfb) - BitBlt(pwfb->hDC, 0, 0, pwfb->stfb->Base.Width, pwfb->stfb->Base.Height, - pwfb->dib_hDC, 0, 0, SRCCOPY); -#else wm_buf = wm_buffer(surf->buffer); pbmi = &bmi; @@ -405,7 +344,6 @@ wm_flush_frontbuffer(struct pipe_winsys *pws, pbmi->bmiHeader.biClrImportant = 0; StretchDIBits(pwfb->hDC, 0, 0, pwfb->stfb->Base.Width, pwfb->stfb->Base.Height, 0, 0, pwfb->stfb->Base.Width, pwfb->stfb->Base.Height, wm_buf->data, pbmi, 0, SRCCOPY); -#endif } @@ -706,9 +644,6 @@ void WMesaDestroyContext( WMesaContext pwc ) /* clean up frame buffer resources */ pwfb = wmesa_lookup_framebuffer(pwc->hDC); if (pwfb) { -#if 0 - wmDeleteBackingStore(pwfb); -#endif wmesa_free_framebuffer(pwc->hDC); } @@ -779,10 +714,6 @@ void WMesaSwapBuffers( HDC hdc ) */ st_notify_swapbuffers(pwfb->stfb); -#if 0 - BitBlt(pwfb->hDC, 0, 0, pwfb->stfb->Base.Width, pwfb->stfb->Base.Height, - pwfb->dib_hDC, 0, 0, SRCCOPY); -#else surf = st_get_framebuffer_surface(pwfb->stfb, ST_SURFACE_BACK_LEFT); wm_buf = wm_buffer(surf->buffer); @@ -809,7 +740,6 @@ void WMesaSwapBuffers( HDC hdc ) st_resize_framebuffer(pwfb->stfb, width, height); } -#endif } /* This is hopefully a temporary hack to define some needed dispatch -- 2.30.2