Commit 0ec823ce authored by Eric Anholt's avatar Eric Anholt Committed by Zhigang Gong

Add build infrastructure for glamor.

parent 7fb4bef0
......@@ -38,6 +38,7 @@ SUBDIRS = \
$(COMPOSITE_DIR) \
$(GLX_DIR) \
exa \
glamor \
config \
hw \
test
......@@ -88,6 +89,7 @@ DIST_SUBDIRS = \
composite \
glx \
exa \
glamor \
config \
hw \
test
......
......@@ -2133,6 +2133,7 @@ Xext/Makefile
Xi/Makefile
xfixes/Makefile
exa/Makefile
glamor/Makefile
hw/Makefile
hw/xfree86/Makefile
hw/xfree86/common/Makefile
......
noinst_LTLIBRARIES = libglamor.la
# Override these since glamor doesn't need them and the needed files aren't
# built (in hw/xfree86/os-support/solaris) until after glamor is built
SOLARIS_ASM_CFLAGS=""
if XORG
sdk_HEADERS = glamor.h
endif
INCLUDES = \
$(XORG_INCS)
AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
libglamor_la_SOURCES = \
glamor.c \
glamor.h
/*
* Copyright © 2008 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Authors:
* Eric Anholt <eric@anholt.net>
*
*/
/** @file
* This file covers the initialization and teardown of glamor, and has various
* functions not responsible for performing rendering.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <stdlib.h>
/*
* Copyright © 2008 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Authors:
* Eric Anholt <eric@anholt.net>
*
*/
......@@ -7,7 +7,8 @@ INCLUDES = \
@XEPHYR_CFLAGS@ \
@DRIPROTO_CFLAGS@ \
-I$(top_srcdir) \
-I$(top_srcdir)/exa
-I$(top_srcdir)/exa \
-I$(top_srcdir)/glamor
if XV
LIBXEPHYR_HOSTXV=libxephyr-hostxv.la
......@@ -47,6 +48,7 @@ XEPHYR_SRCS = \
ephyr.h \
ephyrlog.h \
ephyr_draw.c \
ephyr_glamor.c \
os.c
libxephyr_hostx_la_SOURCES = $(HOSTX_SRCS)
......@@ -70,6 +72,7 @@ Xephyr_LDADD = \
$(LIBXEPHYR_HOSTXV) \
$(LIBXEPHYR_HOSTDRI) \
$(top_builddir)/exa/libexa.la \
$(top_builddir)/glamor/libglamor.la \
@KDRIVE_LIBS@ \
@XEPHYR_LIBS@
......
......@@ -196,6 +196,12 @@ ephyrDrawDisable(ScreenPtr pScreen);
void
ephyrDrawFini(ScreenPtr pScreen);
/* ephyr_glamor.c */
Bool ephyr_glamor_init(ScreenPtr pScreen);
void ephyr_glamor_enable(ScreenPtr pScreen);
void ephyr_glamor_disable(ScreenPtr pScreen);
void ephyr_glamor_fini(ScreenPtr pScreen);
/*ephyvideo.c*/
Bool ephyrInitVideo(ScreenPtr pScreen) ;
......
/*
* Copyright © 2006 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Eric Anholt <eric@anholt.net>
*
*/
#ifdef HAVE_CONFIG_H
#include <kdrive-config.h>
#endif
#include "ephyr.h"
/*#include "glamor.h"*/
/**
* This function initializes EXA to use the fake acceleration implementation
* which just falls through to software. The purpose is to have a reliable,
* correct driver with which to test changes to the EXA core.
*/
Bool
ephyr_glamor_init(ScreenPtr pScreen)
{
return TRUE;
}
void
ephyr_glamor_enable(ScreenPtr pScreen)
{
}
void
ephyr_glamor_disable(ScreenPtr pScreen)
{
}
void
ephyr_glamor_fini(ScreenPtr pScreen)
{
}
......@@ -117,6 +117,7 @@ ddxUseMsg (void)
ErrorF("-host-cursor Re-use exisiting X host server cursor\n");
ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
ErrorF("-grayscale Simulate 8bit grayscale\n");
ErrorF("-glamor Enable 2D acceleration using glamor\n");
ErrorF("-fakexa Simulate acceleration using software rendering\n");
ErrorF("-verbosity <level> Set log verbosity level\n");
#ifdef GLXEXT
......@@ -220,6 +221,14 @@ ddxProcessArgument (int argc, char **argv, int i)
EphyrWantGrayScale = 1;
return 1;
}
else if (!strcmp (argv[i], "-glamor"))
{
ephyrFuncs.initAccel = ephyr_glamor_init;
ephyrFuncs.enableAccel = ephyr_glamor_enable;
ephyrFuncs.disableAccel = ephyr_glamor_disable;
ephyrFuncs.finiAccel = ephyr_glamor_fini;
return 1;
}
else if (!strcmp (argv[i], "-fakexa"))
{
ephyrFuncs.initAccel = ephyrDrawInit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment