diff options
-rw-r--r-- | src/mesa/drivers/dri/glamo/Makefile | 23 | ||||
-rw-r--r-- | src/mesa/drivers/dri/glamo/glamo_dri.c | 122 |
2 files changed, 145 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/glamo/Makefile b/src/mesa/drivers/dri/glamo/Makefile new file mode 100644 index 0000000000..0ef3afcc51 --- /dev/null +++ b/src/mesa/drivers/dri/glamo/Makefile @@ -0,0 +1,23 @@ +# src/mesa/drivers/dri/glamo/Makefile + +TOP = ../../../../.. +include $(TOP)/configs/current + +LIBNAME = glamo_dri.so + +DRIVER_SOURCES = \ + glamo_dri.c + +C_SOURCES = \ + $(COMMON_SOURCES) \ + $(DRIVER_SOURCES) + +ASM_SOURCES = + +# XXX not 100% sure this is right +#WINDOW_SYSTEM = solo + +include ../Makefile.template + +symlinks: + diff --git a/src/mesa/drivers/dri/glamo/glamo_dri.c b/src/mesa/drivers/dri/glamo/glamo_dri.c new file mode 100644 index 0000000000..6d7172484f --- /dev/null +++ b/src/mesa/drivers/dri/glamo/glamo_dri.c @@ -0,0 +1,122 @@ +/* + * Direct Rendering Support for SMedia Glamo 336x/337x + * + * (c) 2009 Thomas White <taw@bitwiz.org.uk> + * + * 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 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 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. + */ + + +static int glamoInitDriver(__DRIscreenPrivate *psp) +{ + return 0; +} + + +static const __DRIconfig **glamoInitScreen(__DRIscreenPrivate *psp) +{ + uint8_t depth_bits_array[1]; + uint8_t stencil_bits_array[1]; + static const GLenum db_modes[1] = { GLX_NONE }; + + /* Our basic initialisation */ + if ( glamoInitDriver(psp) ) { + return NULL; + } + + depth_bits_array[0] = 24; + stencil_bits_array[0] = 8; + + /* Report what modes we can handle */ + return driCreateConfigs(GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, + depth_bits_array, stencil_bits_array, 1, + db_modes, 1); +} + + +static void glamoDestroyScreen(__DRIscreenPrivate *psp) +{ +} + + +static GLboolean glamoCreateContext(const __GLcontextModes *glVis, + __DRIcontext *driContextPriv, + void *sharedContextPrivate) +{ +} + + +static void glamoDestroyContext(__DRIcontext *dcp) +{ +} + + +static GLboolean glamoCreateBuffer(__DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, + const __GLcontextModes *glVis, + GLboolean pixmapBuffer) +{ +} + + +static void glamoDestroyBuffer(__DRIdrawable *driDrawPriv) +{ +} + + +static void glamoSwapBuffers(__DRIdrawable *driDrawPriv) +{ +} + + +static GLboolean glamoMakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv) +{ +} + + +static GLboolean glamoUnbindContext(__DRIcontext *driContextPriv) +{ +} + + +/* + * Mesa entry points + * + * See src/mesa/drivers/dri/common/dri_util.h for information about these + */ +const struct __DriverAPIRec driDriverAPI = { + .InitScreen = glamoInitScreen, + .DestroyScreen = glamoDestroyScreen, + .CreateContext = glamoCreateContext, + .DestroyContext = glamoDestroyContext, + .CreateBuffer = glamoCreateBuffer, + .DestroyBuffer = glamoDestroyBuffer, + .SwapBuffers = glamoSwapBuffers, + .MakeCurrent = glamoMakeCurrent, + .UnbindContext = glamoUnbindContext, + .GetSwapInfo = NULL, /* Not used */ + .WaitForMSC = NULL, + .WaitForSBC = NULL, + .SwapBuffersMSC = NULL, + .CopySubBuffer = NULL, + .GetDrawableMSC = NULL, /* Not used */ + .InitScreen2 = NULL /* For DRI2 */ +}; + |