we now have src/gallium/winsys/drm/intel/{common,dri,egl}tags/mesa_20090313
@@ -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 | |||
@@ -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. |
@@ -1,8 +1,8 @@ | |||
Import('*') | |||
if env['dri']: | |||
if env['drm']: | |||
SConscript([ | |||
'dri/SConscript', | |||
'drm/SConscript', | |||
]) | |||
if 'xlib' in env['winsys']: |
@@ -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: |
@@ -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 \ |
@@ -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) | |||
@@ -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 | |||
@@ -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 |
@@ -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; |
@@ -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" |
@@ -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 | |||
{ |
@@ -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" | |||
/** |
@@ -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: |
@@ -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 |
@@ -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; |
@@ -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" | |||
@@ -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; |
@@ -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 |
@@ -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 |
@@ -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 |