diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-01-27 15:53:40 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-01-27 20:55:38 +0100 |
commit | 69f63e812e8a3bb82245b2342dacdf6f28687668 (patch) | |
tree | 83bfdca43cf99abb6784a2363ff2ce62482456a6 /kernel_drivers | |
parent | eee4bc8dd953afc4fb92f81c35c684245e628ce4 (diff) |
cubox: fb rendering beginnings
try to support old as well as new Vivante kernel drivers
Diffstat (limited to 'kernel_drivers')
10 files changed, 3963 insertions, 0 deletions
diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/Android.mk.def b/kernel_drivers/gc600_driver_dove/galcore_ko_src/Android.mk.def new file mode 100644 index 0000000..344905c --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/Android.mk.def @@ -0,0 +1,92 @@ +############################################################################## +# +# Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +# +# The material in this file is confidential and contains trade secrets +# of Vivante Corporation. This is proprietary information owned by +# Vivante Corporation. No part of this work may be disclosed, +# reproduced, copied, transmitted, or used in any way for any purpose, +# without the express written permission of Vivante Corporation. +# +############################################################################## +# +# +############################################################################## + + +# +# Common include file for Android build +# + +################################################################ +# Options. + +# CPU arch type. Could be 'arm' or 'mips' +ARCH_TYPE ?= arm +FIXED_ARCH_TYPE ?= + +# CPU arch type. +GPU_TYPE ?= XAQ2 + +# Kernel directory +export KERNEL_DIR ?= $(ANDROID_BUILD_TOP)/kernel/kernel + +# Cross compiler for building kernel module +export CROSS_COMPILE ?= arm-eabi- + +# Driver build options. +NO_DMA_COHERENT ?= 1 +ENABLE_GPU_CLOCK_BY_DRIVER ?= 1 +ENABLE_ARM_L2_CACHE ?= 1 +USE_PLATFORM_DRIVER ?= 1 +USE_NEW_LINUX_SIGNAL ?= 0 +USE_PROFILER ?= 0 + + +################################################################ +# Target INCLUDES. + +C_INCLUDES := $(TARGET_C_INCLUDES) $(filter-out %/opengl/include,$(TARGET_PROJECT_INCLUDES)) + + +################################################################ +# Target CFLAGS. + +CFLAGS := $(TARGET_GLOBAL_CFLAGS) $(TARGET_$(ARCH_TYPE)_CFLAGS) + +CFLAGS += -DANDROID=1 -DEGL_API_ANDROID=1 -DUSE_VDK=0 -DLINUX +CFLAGS += -fno-strict-aliasing -fno-short-enums + +ifeq ($(PLATFORM_SDK_VERSION), 7) +CFLAGS += -DANDROID_VERSION_ECLAIR +else +$(error This makefile is only for eclair) +endif + +ifeq ($(USE_PROFILER), 1) +CFLAGS += -DVIVANTE_PROFILER=1 +else +CFLAGS += -DVIVANTE_PROFILER=0 +endif + + +################################################################ +# Tag. + +TAG := VIVANTE + +################################################################ +# Variables. + +export AQROOT := $(abspath $(call my-dir)) +export AQARCH := $(AQROOT)/arch/$(GPU_TYPE) + +GC_HAL_USER_DIR := hal/user +GC_HAL_ARCH_USER_DIR := arch/$(GPU_TYPE)/hal/user +GC_HAL_OS_USER_DIR := hal/os/linux/user +GC_HAL_OPTIMIZER_DIR := hal/optimizer +GC_EGL_DIR := driver/openGL/egl +GC_GLES11_DIR := driver/openGL/libGLESv11 +GC_GLESv2X_DIR := driver/openGL/libGLESv2x/driver +GC_GLESv2SC_DIR := driver/openGL/libGLESv2x/compiler/libGLESv2SC + diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/makefile.linux b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/makefile.linux new file mode 100644 index 0000000..f957d92 --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/makefile.linux @@ -0,0 +1,46 @@ +############################################################################## +# +# Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +# +# The material in this file is confidential and contains trade secrets +# of Vivante Corporation. This is proprietary information owned by +# Vivante Corporation. No part of this work may be disclosed, +# reproduced, copied, transmitted, or used in any way for any purpose, +# without the express written permission of Vivante Corporation. +# +############################################################################## +# +# +############################################################################## + + + +# +# Linux build file for the user level HAL libraries. +# + + + +################################################################################ +# Define make command. + +MAKE = make --makefile=makefile.linux + + +################################################################################ +# Define build directories. + +HAL_USER_DRV_ARCH := $(AQARCH)/hal/user +ifeq ($(QNX), 1) +HAL_USER_DRV_OS := $(AQROOT)/hal/os/qnx/user +else +HAL_USER_DRV_OS := $(AQROOT)/hal/os/linux/user +endif +HAL_USER_DRV_MAIN := $(AQROOT)/hal/user + +$(HAL_USER_DRV_MAIN): $(HAL_USER_DRV_ARCH) $(HAL_USER_DRV_OS) + +MODULES := $(HAL_USER_DRV_ARCH) $(HAL_USER_DRV_OS) $(HAL_USER_DRV_MAIN) +MAIN_MODULE = $(HAL_USER_DRV_MAIN) + +include $(AQROOT)/common.node diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gcProfiler.h b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gcProfiler.h new file mode 100644 index 0000000..ed1d2ef --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gcProfiler.h @@ -0,0 +1,44 @@ +/****************************************************************************
+*
+* Copyright (c) 2002 - 2008 by Vivante Corp. All rights reserved.
+*
+* The material in this file is confidential and contains trade secrets
+* of Vivante Corporation. This is proprietary information owned by
+* Vivante Corporation. No part of this work may be disclosed,
+* reproduced, copied, transmitted, or used in any way for any purpose,
+* without the express written permission of Vivante Corporation.
+*
+*****************************************************************************
+*
+*
+*****************************************************************************/
+
+.
+#ifndef __gl2_profile_h_
+#define __gl2_profile_h_
+
+#include <stdio.h>
+
+
+#define GLVERTEX_OBJECT 10
+#define GLVERTEX_OBJECT_BYTES 11
+
+#define GLINDEX_OBJECT 20
+#define GLINDEX_OBJECT_BYTES 21
+
+#define GLTEXTURE_OBJECT 30
+#define GLTEXTURE_OBJECT_BYTES 31
+
+#define GL_SHADER_OBJECT 40
+
+#define GL_PROGRAM_IN_USE_BEGIN 50
+
+#if VIVANTE_PROFILER
+# define gcmPROFILE_GC(hal, _enum, value) countGCProfiler(hal, _enum, value)
+#else
+# define gcmPROFILE_GC(hal, _enum, value)
+#endif
+
+void countGCProfiler( IN gcoHAL , gctUINT32 , int );
+
+#endif
diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user.h b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user.h new file mode 100644 index 0000000..d29a93f --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user.h @@ -0,0 +1,2384 @@ +/**************************************************************************** +* +* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +* +* The material in this file is confidential and contains trade secrets +* of Vivante Corporation. This is proprietary information owned by +* Vivante Corporation. No part of this work may be disclosed, +* reproduced, copied, transmitted, or used in any way for any purpose, +* without the express written permission of Vivante Corporation. +* +***************************************************************************** +* +* +*****************************************************************************/ + + + + +#ifndef __gc_hal_user_h_ +#define __gc_hal_user_h_ + +#include "gc_hal.h" +#include "gc_hal_driver.h" +#include "gc_hal_enum.h" +#include "gc_hal_dump.h" +#include "gc_hal_base.h" +#include "gc_hal_raster.h" + +#ifndef VIVANTE_NO_3D +#include "gc_hal_engine.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if MRVL_OPTI_USE_RESERVE_MEMORY +#define RESERVE_MEMORY_NUM 3 +#define RESERVE_MEMORY_SIZE 524288 +#endif +/******************************************************************************\ +******************************* Multicast values ******************************* +\******************************************************************************/ + +/* Value types. */ +typedef enum _gceVALUE_TYPE +{ + gcvVALUE_UINT, + gcvVALUE_FIXED, + gcvVALUE_FLOAT, +} +gceVALUE_TYPE; + +/* Value unions. */ +typedef union _gcuVALUE +{ + gctUINT uintValue; + gctFIXED_POINT fixedValue; + gctFLOAT floatValue; +} +gcuVALUE; + +/******************************************************************************\ +***************************** gcsSAMPLES Structure ***************************** +\******************************************************************************/ + +typedef struct _gcsSAMPLES +{ + gctUINT8 x; + gctUINT8 y; +} +gcsSAMPLES; + +/******************************************************************************\ +****************************** Object Declarations ***************************** +\******************************************************************************/ + +typedef struct _gcoBUFFER * gcoBUFFER; + +/******************************************************************************\ +******************************* gcoHARDWARE Object ****************************** +\******************************************************************************/ + +/*----------------------------------------------------------------------------*/ +/*----------------------------- gcoHARDWARE Common ----------------------------*/ + +/* Construct a new gcoHARDWARE object. */ +gceSTATUS +gcoHARDWARE_Construct( + IN gcoHAL Hal, + OUT gcoHARDWARE * Hardware + ); + +/* Destroy an gcoHARDWARE object. */ +gceSTATUS +gcoHARDWARE_Destroy( + IN gcoHARDWARE Hardware + ); + +/* Query the identity of the hardware. */ +gceSTATUS +gcoHARDWARE_QueryChipIdentity( + IN gcoHARDWARE Hardware, + OUT gceCHIPMODEL* ChipModel, + OUT gctUINT32* ChipRevision, + OUT gctUINT32* ChipFeatures, + OUT gctUINT32* ChipMinorFeatures, + OUT gctUINT32* ChipMinorFeatures1 + ); + +/* Verify whether the specified feature is available in hardware. */ +gceSTATUS +gcoHARDWARE_IsFeatureAvailable( + IN gcoHARDWARE Hardware, + IN gceFEATURE Feature + ); + +/* Query command buffer requirements. */ +gceSTATUS +gcoHARDWARE_QueryCommandBuffer( + IN gcoHARDWARE Hardware, + OUT gctSIZE_T * Alignment, + OUT gctSIZE_T * ReservedHead, + OUT gctSIZE_T * ReservedTail + ); + +/* Select a graphics pipe. */ +gceSTATUS +gcoHARDWARE_SelectPipe( + IN gcoHARDWARE Hardware, + IN gctUINT8 Pipe + ); + +/* Flush the current graphics pipe. */ +gceSTATUS +gcoHARDWARE_FlushPipe( + IN gcoHARDWARE Hardware + ); + +/* Send semaphore down the current pipe. */ +gceSTATUS +gcoHARDWARE_Semaphore( + IN gcoHARDWARE Hardware, + IN gceWHERE From, + IN gceWHERE To, + IN gceHOW How + ); + +/* Load a number of load states. */ +gceSTATUS +gcoHARDWARE_LoadState( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctSIZE_T Count, + IN gctPOINTER States + ); + +/* Load a number of load states. */ +gceSTATUS +gcoHARDWARE_LoadStateBuffer( + IN gcoHARDWARE Hardware, + IN gctCONST_POINTER StateBuffer, + IN gctSIZE_T Bytes + ); + +/* Load a number of load states in fixed-point (3D pipe). */ +gceSTATUS +gcoHARDWARE_LoadStateX( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctSIZE_T Count, + IN gctPOINTER States + ); + +/* Load a number of load states in floating-point (3D pipe). */ +gceSTATUS +gcoHARDWARE_LoadStateF( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctSIZE_T Count, + IN gctPOINTER States + ); + +/* Load one 32-bit load state. */ +gceSTATUS +gcoHARDWARE_LoadState32( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctUINT32 Data + ); + +/* Load one 32-bit load state. */ +gceSTATUS +gcoHARDWARE_LoadState32x( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctFIXED_POINT Data + ); + +/* Load one 64-bit load state. */ +gceSTATUS +gcoHARDWARE_LoadState64( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctUINT64 Data + ); + +gceSTATUS +gcoHARDWARE_LoadStateBlock( + IN gcoHARDWARE Hardware, + IN gctUINT32_PTR States, + IN gctSIZE_T Count + ); + +/* Preserve cmd buffer space */ +gceSTATUS +gcoHARDWARE_PreserveCmdSpace( + IN gcoHARDWARE Hardware, + IN gctSIZE_T Size + ); + +gceSTATUS +gcoHARDWARE_SkipContext( + IN gcoHARDWARE Hardware, + IN gctBOOL Value + ); + +/* Commit the current command buffer. */ +gceSTATUS +gcoHARDWARE_Commit( + IN gcoHARDWARE Hardware + ); + +/* Stall the pipe. */ +gceSTATUS +gcoHARDWARE_Stall( + IN gcoHARDWARE Hardware + ); + +/* Compute the offset of the specified pixel location. */ +gceSTATUS +gcoHARDWARE_ComputeOffset( + IN gctINT32 X, + IN gctINT32 Y, + IN gctUINT Stride, + IN gctINT BytesPerPixel, + IN gceTILING Tiling, + OUT gctUINT32_PTR Offset + ); + +/* Resolve. */ +gceSTATUS +gcoHARDWARE_ResolveRect( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR SrcInfo, + IN gcsSURF_INFO_PTR DestInfo, + IN gcsPOINT_PTR SrcOrigin, + IN gcsPOINT_PTR DestOrigin, + IN gcsPOINT_PTR RectSize + ); + +/* Resolve depth buffer. */ +gceSTATUS +gcoHARDWARE_ResolveDepth( + IN gcoHARDWARE Hardware, + IN gctUINT32 SrcTileStatusAddress, + IN gcsSURF_INFO_PTR SrcInfo, + IN gcsSURF_INFO_PTR DestInfo, + IN gcsPOINT_PTR SrcOrigin, + IN gcsPOINT_PTR DestOrigin, + IN gcsPOINT_PTR RectSize + ); + +/* Query the tile size of the given surface. */ +gceSTATUS +gcoHARDWARE_GetSurfaceTileSize( + IN gcsSURF_INFO_PTR Surface, + OUT gctINT32 * TileWidth, + OUT gctINT32 * TileHeight + ); + +/* Query tile sizes. */ +gceSTATUS +gcoHARDWARE_QueryTileSize( + OUT gctINT32 * TileWidth2D, + OUT gctINT32 * TileHeight2D, + OUT gctINT32 * TileWidth3D, + OUT gctINT32 * TileHeight3D, + OUT gctUINT32 * StrideAlignment + ); + +/* Get tile status sizes for a surface. */ +gceSTATUS +gcoHARDWARE_QueryTileStatus( + IN gcoHARDWARE Hardware, + IN gctUINT Width, + IN gctUINT Height, + IN gctSIZE_T Bytes, + OUT gctSIZE_T_PTR Size, + OUT gctUINT_PTR Alignment, + OUT gctUINT32_PTR Filler + ); + +/* Enable tile status for a surface. */ +gceSTATUS +gcoHARDWARE_EnableTileStatus( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface, + IN gctUINT32 TileStatusAddress, + IN gcsSURF_NODE_PTR HzTileStatus + ); + +/* Disable tile status for a surface. */ +gceSTATUS +gcoHARDWARE_DisableTileStatus( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface, + IN gctBOOL CpuAccess + ); + +/* Flush tile status cache. */ +gceSTATUS +gcoHARDWARE_FlushTileStatus( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface, + IN gctBOOL Decompress + ); + +typedef enum _gceTILE_STATUS_CONTROL +{ + gcvTILE_STATUS_PAUSE, + gcvTILE_STATUS_RESUME, +} +gceTILE_STATUS_CONTROL; + +/* Pause or resume tile status. */ +gceSTATUS gcoHARDWARE_PauseTileStatus( + IN gcoHARDWARE Hardware, + IN gceTILE_STATUS_CONTROL Control + ); + +/* Lock a surface. */ +gceSTATUS +gcoHARDWARE_Lock( + IN gcoHARDWARE Hardware, + IN gcsSURF_NODE_PTR Node, + OUT gctUINT32 * Address, + OUT gctPOINTER * Memory + ); + +/* Unlock a surface. */ +gceSTATUS +gcoHARDWARE_Unlock( + IN gcoHARDWARE Hardware, + IN gcsSURF_NODE_PTR Node, + IN gceSURF_TYPE Type + ); + +/* Call kernel for event. */ +gceSTATUS +gcoHARDWARE_CallEvent( + IN gcoHARDWARE Hardware, + IN OUT gcsHAL_INTERFACE * Interface + ); + +/* Schedule destruction for the specified video memory node. */ +gceSTATUS +gcoHARDWARE_ScheduleVideoMemory( + IN gcoHARDWARE Hardware, + IN gcsSURF_NODE_PTR Node + ); + +/* Allocate a temporary surface with specified parameters. */ +gceSTATUS +gcoHARDWARE_AllocateTemporarySurface( + IN gcoHARDWARE Hardware, + IN gctUINT Width, + IN gctUINT Height, + IN gcsSURF_FORMAT_INFO_PTR Format, + IN gceSURF_TYPE Type + ); + +/* Free the temporary surface. */ +gceSTATUS +gcoHARDWARE_FreeTemporarySurface( + IN gcoHARDWARE Hardware, + IN gctBOOL Synchronized + ); + +/* Convert pixel format. */ +gceSTATUS +gcoHARDWARE_ConvertPixel( + IN gcoHARDWARE Hardware, + IN gctPOINTER SrcPixel, + OUT gctPOINTER TrgPixel, + IN gctUINT SrcBitOffset, + IN gctUINT TrgBitOffset, + IN gcsSURF_FORMAT_INFO_PTR SrcFormat, + IN gcsSURF_FORMAT_INFO_PTR TrgFormat, + IN gcsBOUNDARY_PTR SrcBoundary, + IN gcsBOUNDARY_PTR TrgBoundary + ); + +/* Copy a rectangular area with format conversion. */ +gceSTATUS +gcoHARDWARE_CopyPixels( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Source, + IN gcsSURF_INFO_PTR Target, + IN gctINT SourceX, + IN gctINT SourceY, + IN gctINT TargetX, + IN gctINT TargetY, + IN gctINT Width, + IN gctINT Height + ); + +/* Enable or disable anti-aliasing. */ +gceSTATUS +gcoHARDWARE_SetAntiAlias( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +/* Write data into the command buffer. */ +gceSTATUS +gcoHARDWARE_WriteBuffer( + IN gcoHARDWARE Hardware, + IN gctCONST_POINTER Data, + IN gctSIZE_T Bytes, + IN gctBOOL Aligned + ); + +/* Convert RGB8 color value to YUV color space. */ +void gcoHARDWARE_RGB2YUV( + gctUINT8 R, + gctUINT8 G, + gctUINT8 B, + gctUINT8_PTR Y, + gctUINT8_PTR U, + gctUINT8_PTR V + ); + +/* Convert YUV color value to RGB8 color space. */ +void gcoHARDWARE_YUV2RGB( + gctUINT8 Y, + gctUINT8 U, + gctUINT8 V, + gctUINT8_PTR R, + gctUINT8_PTR G, + gctUINT8_PTR B + ); + +/* Convert an API format. */ +gceSTATUS +gcoHARDWARE_ConvertFormat( + IN gcoHARDWARE Hardware, + IN gceSURF_FORMAT Format, + OUT gctUINT32 * BitsPerPixel, + OUT gctUINT32 * BytesPerTile + ); + +/* Convert face to offset */ +gceSTATUS +gcoHARDWARE_ConvertFace( + IN gcoHARDWARE Hardware, + IN gctUINT32 Width, + IN gctUINT32 Height, + IN gceSURF_FORMAT Format, + IN gctUINT Face, + OUT gctUINT32 * Offset + ); + +/* Align size to tile boundary. */ +gceSTATUS +gcoHARDWARE_AlignToTile( + IN gcoHARDWARE Hardware, + IN gceSURF_TYPE Type, + IN OUT gctUINT32_PTR Width, + IN OUT gctUINT32_PTR Height, + OUT gctBOOL_PTR SuperTiled + ); + +/*----------------------------------------------------------------------------*/ +/*----------------------- gcoHARDWARE Fragment Processor ---------------------*/ + +/* Set the fragment processor configuration. */ +gceSTATUS +gcoHARDWARE_SetFragmentConfiguration( + IN gcoHARDWARE Hardware, + IN gctBOOL ColorFromStream, + IN gctBOOL EnableFog, + IN gctBOOL EnableSmoothPoint, + IN gctUINT32 ClipPlanes + ); + +/* Enable/disable texture stage operation. */ +gceSTATUS +gcoHARDWARE_EnableTextureStage( + IN gcoHARDWARE Hardware, + IN gctINT Stage, + IN gctBOOL Enable + ); + +/* Program the channel enable masks for the color texture function. */ +gceSTATUS +gcoHARDWARE_SetTextureColorMask( + IN gcoHARDWARE Hardware, + IN gctINT Stage, + IN gctBOOL ColorEnabled, + IN gctBOOL AlphaEnabled + ); + +/* Program the channel enable masks for the alpha texture function. */ +gceSTATUS +gcoHARDWARE_SetTextureAlphaMask( + IN gcoHARDWARE Hardware, + IN gctINT Stage, + IN gctBOOL ColorEnabled, + IN gctBOOL AlphaEnabled + ); + +/* Program the constant fragment color. */ +gceSTATUS +gcoHARDWARE_SetFragmentColorX( + IN gcoHARDWARE Hardware, + IN gctFIXED_POINT Red, + IN gctFIXED_POINT Green, + IN gctFIXED_POINT Blue, + IN gctFIXED_POINT Alpha + ); + +gceSTATUS +gcoHARDWARE_SetFragmentColorF( + IN gcoHARDWARE Hardware, + IN gctFLOAT Red, + IN gctFLOAT Green, + IN gctFLOAT Blue, + IN gctFLOAT Alpha + ); + +/* Program the constant fog color. */ +gceSTATUS +gcoHARDWARE_SetFogColorX( + IN gcoHARDWARE Hardware, + IN gctFIXED_POINT Red, + IN gctFIXED_POINT Green, + IN gctFIXED_POINT Blue, + IN gctFIXED_POINT Alpha + ); + +gceSTATUS +gcoHARDWARE_SetFogColorF( + IN gcoHARDWARE Hardware, + IN gctFLOAT Red, + IN gctFLOAT Green, + IN gctFLOAT Blue, + IN gctFLOAT Alpha + ); + +/* Program the constant texture color. */ +gceSTATUS +gcoHARDWARE_SetTetxureColorX( + IN gcoHARDWARE Hardware, + IN gctINT Stage, + IN gctFIXED_POINT Red, + IN gctFIXED_POINT Green, + IN gctFIXED_POINT Blue, + IN gctFIXED_POINT Alpha + ); + +gceSTATUS +gcoHARDWARE_SetTetxureColorF( + IN gcoHARDWARE Hardware, + IN gctINT Stage, + IN gctFLOAT Red, + IN gctFLOAT Green, + IN gctFLOAT Blue, + IN gctFLOAT Alpha + ); + +/* Configure color texture function. */ +gceSTATUS +gcoHARDWARE_SetColorTextureFunction( + IN gcoHARDWARE Hardware, + IN gctINT Stage, + IN gceTEXTURE_FUNCTION Function, + IN gceTEXTURE_SOURCE Source0, + IN gceTEXTURE_CHANNEL Channel0, + IN gceTEXTURE_SOURCE Source1, + IN gceTEXTURE_CHANNEL Channel1, + IN gceTEXTURE_SOURCE Source2, + IN gceTEXTURE_CHANNEL Channel2, + IN gctINT Scale + ); + +/* Configure alpha texture function. */ +gceSTATUS +gcoHARDWARE_SetAlphaTextureFunction( + IN gcoHARDWARE Hardware, + IN gctINT Stage, + IN gceTEXTURE_FUNCTION Function, + IN gceTEXTURE_SOURCE Source0, + IN gceTEXTURE_CHANNEL Channel0, + IN gceTEXTURE_SOURCE Source1, + IN gceTEXTURE_CHANNEL Channel1, + IN gceTEXTURE_SOURCE Source2, + IN gceTEXTURE_CHANNEL Channel2, + IN gctINT Scale + ); + +/*----------------------------------------------------------------------------*/ +/*------------------------------- gcoHARDWARE 2D ------------------------------*/ + +/* Translate API source color format to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateSourceFormat( + IN gcoHARDWARE Hardware, + IN gceSURF_FORMAT APIValue, + OUT gctUINT32* HwValue, + OUT gctUINT32* HwSwizzleValue, + OUT gctUINT32* HwIsYUVValue + ); + +/* Translate API destination color format to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateDestinationFormat( + IN gcoHARDWARE Hardware, + IN gceSURF_FORMAT APIValue, + OUT gctUINT32* HwValue, + OUT gctUINT32* HwSwizzleValue, + OUT gctUINT32* HwIsYUVValue + ); + +/* Translate API pattern color format to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslatePatternFormat( + IN gcoHARDWARE Hardware, + IN gceSURF_FORMAT APIValue, + OUT gctUINT32* HwValue, + OUT gctUINT32* HwSwizzleValue, + OUT gctUINT32* HwIsYUVValue + ); + +/* Translate API transparency mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateTransparency( + IN gceSURF_TRANSPARENCY APIValue, + OUT gctUINT32* HwValue + ); + +/* Translate SURF API transparency mode to PE 2.0 transparency values. */ +gceSTATUS +gcoHARDWARE_TranslateSurfTransparency( + IN gceSURF_TRANSPARENCY APIValue, + OUT gctUINT32* srcTransparency, + OUT gctUINT32* dstTransparency, + OUT gctUINT32* patTransparency + ); + +/* Translate API transparency mode to its PE 1.0 hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateTransparencies( + IN gcoHARDWARE Hardware, + IN gctUINT32 srcTransparency, + IN gctUINT32 dstTransparency, + IN gctUINT32 patTransparency, + OUT gctUINT32* HwValue + ); + +/* Translate API transparency mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateSourceTransparency( + IN gce2D_TRANSPARENCY APIValue, + OUT gctUINT32 * HwValue + ); + +/* Translate API transparency mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateDestinationTransparency( + IN gce2D_TRANSPARENCY APIValue, + OUT gctUINT32 * HwValue + ); + +/* Translate API transparency mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslatePatternTransparency( + IN gce2D_TRANSPARENCY APIValue, + OUT gctUINT32 * HwValue + ); + +/* Translate API YUV Color mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateYUVColorMode( + IN gce2D_YUV_COLOR_MODE APIValue, + OUT gctUINT32 * HwValue + ); + +/* Translate API pixel color multiply mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_PixelColorMultiplyMode( + IN gce2D_PIXEL_COLOR_MULTIPLY_MODE APIValue, + OUT gctUINT32 * HwValue + ); + +/* Translate API global color multiply mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_GlobalColorMultiplyMode( + IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE APIValue, + OUT gctUINT32 * HwValue + ); + +/* Translate API mono packing mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateMonoPack( + IN gceSURF_MONOPACK APIValue, + OUT gctUINT32* HwValue + ); + +/* Translate API 2D command to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateCommand( + IN gce2D_COMMAND APIValue, + OUT gctUINT32* HwValue + ); + +/* Translate API per-pixel alpha mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslatePixelAlphaMode( + IN gceSURF_PIXEL_ALPHA_MODE APIValue, + OUT gctUINT32* HwValue + ); + +/* Translate API global alpha mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateGlobalAlphaMode( + IN gceSURF_GLOBAL_ALPHA_MODE APIValue, + OUT gctUINT32* HwValue + ); + +/* Translate API per-pixel color mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslatePixelColorMode( + IN gceSURF_PIXEL_COLOR_MODE APIValue, + OUT gctUINT32* HwValue + ); + +/* Translate API alpha factor mode to its hardware value. */ +gceSTATUS +gcoHARDWARE_TranslateAlphaFactorMode( + IN gcoHARDWARE Hardware, + IN gceSURF_BLEND_FACTOR_MODE APIValue, + OUT gctUINT32_PTR HwValue + ); + +/* Configure monochrome source. */ +gceSTATUS +gcoHARDWARE_SetMonochromeSource( + IN gcoHARDWARE Hardware, + IN gctUINT8 MonoTransparency, + IN gceSURF_MONOPACK DataPack, + IN gctBOOL CoordRelative, + IN gctUINT32 FgColor32, + IN gctUINT32 BgColor32 + ); + +/* Configure color source. */ +gceSTATUS +gcoHARDWARE_SetColorSource( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface, + IN gctBOOL CoordRelative + ); + +/* Configure masked color source. */ +gceSTATUS +gcoHARDWARE_SetMaskedSource( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface, + IN gctBOOL CoordRelative, + IN gceSURF_MONOPACK MaskPack + ); + +/* Setup the source rectangle. */ +gceSTATUS +gcoHARDWARE_SetSource( + IN gcoHARDWARE Hardware, + IN gcsRECT_PTR SrcRect + ); + +/* Setup the fraction of the source origin for filter blit. */ +gceSTATUS +gcoHARDWARE_SetOriginFraction( + IN gcoHARDWARE Hardware, + IN gctUINT16 HorFraction, + IN gctUINT16 VerFraction + ); + +/* Load 256-entry color table for INDEX8 source surfaces. */ +gceSTATUS +gcoHARDWARE_LoadPalette( + IN gcoHARDWARE Hardware, + IN gctUINT FirstIndex, + IN gctUINT IndexCount, + IN gctPOINTER ColorTable, + IN gctBOOL ColorConvert + ); + +/* Setup the source pixel swizzle. */ +gceSTATUS +gcoHARDWARE_SetSourceSwizzle( + IN gcoHARDWARE Hardware, + IN gceSURF_SWIZZLE Swizzle + ); + +/* Setup the source pixel UV swizzle. */ +gceSTATUS +gcoHARDWARE_SetSourceSwizzleUV( + IN gcoHARDWARE Hardware, + IN gctUINT32 SwizzleUV + ); + +/* Setup the source global color value in ARGB8 format. */ +gceSTATUS +gcoHARDWARE_SetSourceGlobalColor( + IN gcoHARDWARE Hardware, + IN gctUINT32 Color + ); + +/* Setup the target global color value in ARGB8 format. */ +gceSTATUS +gcoHARDWARE_SetTargetGlobalColor( + IN gcoHARDWARE Hardware, + IN gctUINT32 Color + ); + +/* Setup the source and target pixel multiply modes. */ +gceSTATUS +gcoHARDWARE_SetMultiplyModes( + IN gcoHARDWARE Hardware, + IN gce2D_PIXEL_COLOR_MULTIPLY_MODE SrcPremultiplySrcAlpha, + IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstPremultiplyDstAlpha, + IN gce2D_GLOBAL_COLOR_MULTIPLY_MODE SrcPremultiplyGlobalMode, + IN gce2D_PIXEL_COLOR_MULTIPLY_MODE DstDemultiplyDstAlpha + ); + +/* Setup the source, target and pattern transparency modes. */ +gceSTATUS +gcoHARDWARE_SetTransparencyModes( + IN gcoHARDWARE Hardware, + IN gce2D_TRANSPARENCY SrcTransparency, + IN gce2D_TRANSPARENCY DstTransparency, + IN gce2D_TRANSPARENCY PatTransparency + ); + +/* Setup the source, target and pattern transparency modes. + Used only for have backward compatibility. +*/ +gceSTATUS +gcoHARDWARE_SetAutoTransparency( + IN gcoHARDWARE Hardware, + IN gctUINT8 FgRop, + IN gctUINT8 BgRop + ); + +/* Setup the source color key value in ARGB8 format. */ +gceSTATUS +gcoHARDWARE_SetSourceColorKeyRange( + IN gcoHARDWARE Hardware, + IN gctUINT32 ColorLow, + IN gctUINT32 ColorHigh, + IN gctBOOL ColorPack + ); + +/* Setup the YUV color space mode. */ +gceSTATUS gcoHARDWARE_YUVColorMode( + IN gcoHARDWARE Hardware, + IN gce2D_YUV_COLOR_MODE Mode + ); + +/* Save mono colors for later programming. */ +gceSTATUS gcoHARDWARE_SaveMonoColors( + IN gcoHARDWARE Hardware, + IN gctUINT32 FgColor, + IN gctUINT32 BgColor + ); + +/* Save transparency color for later programming. */ +gceSTATUS gcoHARDWARE_SaveTransparencyColor( + IN gcoHARDWARE Hardware, + IN gctUINT32 Color32 + ); + +/* Set clipping rectangle. */ +gceSTATUS +gcoHARDWARE_SetClipping( + IN gcoHARDWARE Hardware, + IN gcsRECT_PTR Rect + ); + +/* Configure destination. */ +gceSTATUS +gcoHARDWARE_SetTarget( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface + ); + +/* Set the target color format. */ +gceSTATUS +gcoHARDWARE_SetTargetFormat( + IN gcoHARDWARE Hardware, + IN gceSURF_FORMAT Format + ); + +/* Setup the destination color key value in ARGB8 format. */ +gceSTATUS +gcoHARDWARE_SetTargetColorKeyRange( + IN gcoHARDWARE Hardware, + IN gctUINT32 ColorLow, + IN gctUINT32 ColorHigh + ); + +/* Load solid (single) color pattern. */ +gceSTATUS +gcoHARDWARE_LoadSolidColorPattern( + IN gcoHARDWARE Hardware, + IN gctBOOL ColorConvert, + IN gctUINT32 Color, + IN gctUINT64 Mask + ); + +/* Load monochrome pattern. */ +gceSTATUS +gcoHARDWARE_LoadMonochromePattern( + IN gcoHARDWARE Hardware, + IN gctUINT32 OriginX, + IN gctUINT32 OriginY, + IN gctBOOL ColorConvert, + IN gctUINT32 FgColor, + IN gctUINT32 BgColor, + IN gctUINT64 Bits, + IN gctUINT64 Mask + ); + +/* Load color pattern. */ +gceSTATUS +gcoHARDWARE_LoadColorPattern( + IN gcoHARDWARE Hardware, + IN gctUINT32 OriginX, + IN gctUINT32 OriginY, + IN gctUINT32 Address, + IN gceSURF_FORMAT Format, + IN gctUINT64 Mask + ); + +/* Calculate stretch factor. */ +gctUINT32 +gcoHARDWARE_GetStretchFactor( + IN gctINT32 SrcSize, + IN gctINT32 DestSize + ); + +/* Calculate the stretch factors. */ +gceSTATUS +gcoHARDWARE_GetStretchFactors( + IN gcsRECT_PTR SrcRect, + IN gcsRECT_PTR DestRect, + OUT gctUINT32 * HorFactor, + OUT gctUINT32 * VerFactor + ); + +/* Calculate and program the stretch factors. */ +gceSTATUS +gcoHARDWARE_SetStretchFactors( + IN gcoHARDWARE Hardware, + IN gctUINT32 HorFactor, + IN gctUINT32 VerFactor + ); + +/* Determines the usage of 2D resources (source/pattern/destination). */ +void +gcoHARDWARE_Get2DResourceUsage( + IN gctUINT8 FgRop, + IN gctUINT8 BgRop, + IN gctUINT32 Transparency, + OUT gctBOOL_PTR UseSource, + OUT gctBOOL_PTR UsePattern, + OUT gctBOOL_PTR UseDestination + ); + +/* Set 2D clear color in A8R8G8B8 format. */ +gceSTATUS +gcoHARDWARE_Set2DClearColor( + IN gcoHARDWARE Hardware, + IN gctUINT32 Color, + IN gctBOOL ColorConvert + ); + +/* Enable/disable 2D BitBlt mirrorring. */ +gceSTATUS +gcoHARDWARE_SetBitBlitMirror( + IN gcoHARDWARE Hardware, + IN gctBOOL HorizontalMirror, + IN gctBOOL VerticalMirror + ); + +/* Start a DE command. */ +gceSTATUS +gcoHARDWARE_StartDE( + IN gcoHARDWARE Hardware, + IN gce2D_COMMAND Command, + IN gctUINT32 SrcRectCount, + IN gcsRECT_PTR SrcRect, + IN gctUINT32 DestRectCount, + IN gcsRECT_PTR DestRect, + IN gctUINT32 FgRop, + IN gctUINT32 BgRop + ); + +/* Start a DE command to draw one or more Lines, + with a common or individual color. */ +gceSTATUS +gcoHARDWARE_StartDELine( + IN gcoHARDWARE Hardware, + IN gce2D_COMMAND Command, + IN gctUINT32 RectCount, + IN gcsRECT_PTR DestRect, + IN gctUINT32 ColorCount, + IN gctUINT32_PTR Color32, + IN gctUINT32 FgRop, + IN gctUINT32 BgRop + ); + +/* Start a DE command with a monochrome stream. */ +gceSTATUS +gcoHARDWARE_StartDEStream( + IN gcoHARDWARE Hardware, + IN gcsRECT_PTR DestRect, + IN gctUINT32 FgRop, + IN gctUINT32 BgRop, + IN gctUINT32 StreamSize, + OUT gctPOINTER * StreamBits + ); + +/* Set kernel size. */ +gceSTATUS +gcoHARDWARE_SetKernelSize( + IN gcoHARDWARE Hardware, + IN gctUINT8 HorKernelSize, + IN gctUINT8 VerKernelSize + ); + +/* Set filter type. */ +gceSTATUS +gcoHARDWARE_SetFilterType( + IN gcoHARDWARE Hardware, + IN gceFILTER_TYPE FilterType + ); + +/* Set the filter kernel array by user. */ +gceSTATUS gcoHARDWARE_SetUserFilterKernel( + IN gcoHARDWARE Hardware, + IN gceFILTER_PASS_TYPE PassType, + IN gctUINT16_PTR KernelArray + ); + +/* Select the pass(es) to be done for user defined filter. */ +gceSTATUS gcoHARDWARE_EnableUserFilterPasses( + IN gcoHARDWARE Hardware, + IN gctBOOL HorPass, + IN gctBOOL VerPass + ); + +/* Frees the kernel weight array. */ +gceSTATUS +gcoHARDWARE_FreeKernelArray( + IN gcoHARDWARE Hardware + ); + +/* Frees the temporary buffer allocated by filter blit operation. */ +gceSTATUS +gcoHARDWARE_FreeFilterBuffer( + IN gcoHARDWARE Hardware + ); + +/* Filter blit. */ +gceSTATUS +gcoHARDWARE_FilterBlit( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR SrcSurface, + IN gcsSURF_INFO_PTR DestSurface, + IN gcsRECT_PTR SrcRect, + IN gcsRECT_PTR DestRect, + IN gcsRECT_PTR DestSubRect + ); + +/* Enable alpha blending engine in the hardware and disengage the ROP engine. */ +gceSTATUS +gcoHARDWARE_EnableAlphaBlend( + IN gcoHARDWARE Hardware, + IN gceSURF_PIXEL_ALPHA_MODE SrcAlphaMode, + IN gceSURF_PIXEL_ALPHA_MODE DstAlphaMode, + IN gceSURF_GLOBAL_ALPHA_MODE SrcGlobalAlphaMode, + IN gceSURF_GLOBAL_ALPHA_MODE DstGlobalAlphaMode, + IN gceSURF_BLEND_FACTOR_MODE SrcFactorMode, + IN gceSURF_BLEND_FACTOR_MODE DstFactorMode, + IN gceSURF_PIXEL_COLOR_MODE SrcColorMode, + IN gceSURF_PIXEL_COLOR_MODE DstColorMode + ); + +/* Disable alpha blending engine in the hardware and engage the ROP engine. */ +gceSTATUS +gcoHARDWARE_DisableAlphaBlend( + IN gcoHARDWARE Hardware + ); + +/* Set the GPU clock cycles, after which the idle 2D engine + will trigger a flush. */ +gceSTATUS +gcoHARDWARE_SetAutoFlushCycles( + IN gcoHARDWARE Hardware, + IN gctUINT32 Cycles + ); + +gceSTATUS +gcoHARDWARE_ColorConvertToARGB8( + IN gceSURF_FORMAT Format, + IN gctUINT32 NumColors, + IN gctUINT32_PTR Color, + OUT gctUINT32_PTR Color32 + ); + +gceSTATUS +gcoHARDWARE_ColorConvertFromARGB8( + IN gceSURF_FORMAT Format, + IN gctUINT32 NumColors, + IN gctUINT32_PTR Color32, + OUT gctUINT32_PTR Color + ); + +gceSTATUS +gcoHARDWARE_ColorPackFromARGB8( + IN gceSURF_FORMAT Format, + IN gctUINT32 Color32, + OUT gctUINT32_PTR Color + ); + +#ifndef VIVANTE_NO_3D +/*----------------------------------------------------------------------------*/ +/*------------------------------- gcoHARDWARE 3D ------------------------------*/ + +/* Query if a surface is renderable or not. */ +gceSTATUS +gcoHARDWARE_IsSurfaceRenderable( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface + ); + +/* Initialize the 3D hardware. */ +gceSTATUS +gcoHARDWARE_Initialize3D( + IN gcoHARDWARE Hardware + ); + +/* Query the OpenGL ES 2.0 capabilities. */ +gceSTATUS +gcoHARDWARE_QueryOpenGL2( + OUT gctBOOL * OpenGL2 + ); + +/* Query the stream capabilities. */ +gceSTATUS +gcoHARDWARE_QueryStreamCaps( + IN gcoHARDWARE Hardware, + OUT gctUINT * MaxAttributes, + OUT gctUINT * MaxStreamSize, + OUT gctUINT * NumberOfStreams, + OUT gctUINT * Alignment + ); + +/* Flush the evrtex caches. */ +gceSTATUS +gcoHARDWARE_FlushVertex( + IN gcoHARDWARE Hardware + ); + +/* Flush the evrtex caches. */ +gceSTATUS +gcoHARDWARE_FlushL2Cache( + IN gcoHARDWARE Hardware + ); + +/* Query the index capabilities. */ +gceSTATUS +gcoHARDWARE_QueryIndexCaps( + OUT gctBOOL * Index8, + OUT gctBOOL * Index16, + OUT gctBOOL * Index32, + OUT gctUINT * MaxIndex + ); + +/* Query the target capabilities. */ +gceSTATUS +gcoHARDWARE_QueryTargetCaps( + IN gcoHARDWARE Hardware, + OUT gctUINT * MaxWidth, + OUT gctUINT * MaxHeight, + OUT gctUINT * MultiTargetCount, + OUT gctUINT * MaxSamples + ); + +/* Query the texture capabilities. */ +gceSTATUS +gcoHARDWARE_QueryTextureCaps( + OUT gctUINT * MaxWidth, + OUT gctUINT * MaxHeight, + OUT gctUINT * MaxDepth, + OUT gctBOOL * Cubic, + OUT gctBOOL * NonPowerOfTwo, + OUT gctUINT * VertexSamplers, + OUT gctUINT * PixelSamplers + ); + +/* Query the shader support. */ +gceSTATUS +gcoHARDWARE_QueryShaderCaps( + OUT gctUINT * VertexUniforms, + OUT gctUINT * FragmentUniforms, + OUT gctUINT * Varyings + ); + +gceSTATUS +gcoHARDWARE_GetClosestTextureFormat( + IN gcoHARDWARE Hardware, + IN gceSURF_FORMAT InFormat, + OUT gceSURF_FORMAT* OutFormat + ); + +/* Query the texture mipmap support. */ +gceSTATUS +gcoHARDWARE_QueryTexture_MipMap( + IN gctUINT Width, + IN gctUINT Height + ); + +/* Query the texture support. */ +gceSTATUS +gcoHARDWARE_QueryTexture( + IN gceSURF_FORMAT Format, + IN gctUINT Level, + IN gctUINT Width, + IN gctUINT Height, + IN gctUINT Depth, + IN gctUINT Faces, + OUT gctUINT * WidthAlignment, + OUT gctUINT * HeightAlignment, + OUT gctSIZE_T * SliceSize + ); + +/* Upload data into a texture. */ +gceSTATUS +gcoHARDWARE_UploadTexture( + IN gcoHARDWARE Hardware, + IN gceSURF_FORMAT TargetFormat, + IN gctUINT32 Address, + IN gctPOINTER Logical, + IN gctUINT32 Offset, + IN gctINT TargetStride, + IN gctUINT X, + IN gctUINT Y, + IN gctUINT Width, + IN gctUINT Height, + IN gctCONST_POINTER Memory, + IN gctINT SourceStride, + IN gceSURF_FORMAT SourceFormat + ); + +/* Flush the texture cache. */ +gceSTATUS +gcoHARDWARE_FlushTexture( + IN gcoHARDWARE Hardware + ); + +/* Set the texture addressing mode. */ +gceSTATUS +gcoHARDWARE_SetTextureAddressingMode( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gceTEXTURE_WHICH Which, + IN gceTEXTURE_ADDRESSING Mode + ); + +/* Set the unsigned integer texture border color. */ +gceSTATUS +gcoHARDWARE_SetTextureBorderColor( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctUINT Red, + IN gctUINT Green, + IN gctUINT Blue, + IN gctUINT Alpha + ); + +/* Set the fixed point texture border color. */ +gceSTATUS +gcoHARDWARE_SetTextureBorderColorX( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFIXED_POINT Red, + IN gctFIXED_POINT Green, + IN gctFIXED_POINT Blue, + IN gctFIXED_POINT Alpha + ); + +/* Set the floating point texture border color. */ +gceSTATUS +gcoHARDWARE_SetTextureBorderColorF( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFLOAT Red, + IN gctFLOAT Green, + IN gctFLOAT Blue, + IN gctFLOAT Alpha + ); + +/* Set the texture minification filter. */ +gceSTATUS +gcoHARDWARE_SetTextureMinFilter( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gceTEXTURE_FILTER Filter + ); + +/* Set the texture magnification filter. */ +gceSTATUS +gcoHARDWARE_SetTextureMagFilter( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gceTEXTURE_FILTER Filter + ); + +/* Set the texture mip map filter. */ +gceSTATUS +gcoHARDWARE_SetTextureMipFilter( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gceTEXTURE_FILTER Filter + ); + +/*Set RoundUV, add 1./64. to UV for Nearest sample*/ +gceSTATUS +gcoHARDWARE_SetTextureRoundUV( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctINT RoundEnable + ); + +/* Set the fixed point bias for the level of detail. */ +gceSTATUS +gcoHARDWARE_SetTextureLODBiasX( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFIXED_POINT Bias + ); + +/* Set the floating point bias for the level of detail. */ +gceSTATUS +gcoHARDWARE_SetTextureLODBiasF( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFLOAT Bias + ); + +/* Set the fixed point minimum value for the level of detail. */ +gceSTATUS +gcoHARDWARE_SetTextureLODMinX( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFIXED_POINT LevelOfDetail + ); + +/* Set the floating point minimum value for the level of detail. */ +gceSTATUS +gcoHARDWARE_SetTextureLODMinF( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFLOAT LevelOfDetail + ); + +/* Set the fixed point maximum value for the level of detail. */ +gceSTATUS +gcoHARDWARE_SetTextureLODMaxX( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFIXED_POINT LevelOfDetail + ); + +/* Set the floating point maximum value for the level of detail. */ +gceSTATUS +gcoHARDWARE_SetTextureLODMaxF( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctFLOAT LevelOfDetail + ); + +/* Set texture format. */ +gceSTATUS +gcoHARDWARE_SetTextureFormat( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gceSURF_FORMAT Format, + IN gceENDIAN_HINT EndianHint, + IN gctUINT Width, + IN gctUINT Height, + IN gctUINT Depth, + IN gctUINT Faces + ); + +/* Set texture LOD address. */ +gceSTATUS +gcoHARDWARE_SetTextureLOD( + IN gcoHARDWARE Hardware, + IN gctINT Sampler, + IN gctINT LevelOfDetail, + IN gctUINT32 Address, + IN gctINT Stride + ); + +/* Clear wrapper to distinguish between software and resolve(3d) clear cases. */ +gceSTATUS +gcoHARDWARE_ClearRect( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctPOINTER LogicalAddress, + IN gctUINT32 Stride, + IN gctINT Left, + IN gctINT Top, + IN gctINT Right, + IN gctINT Bottom, + IN gceSURF_FORMAT Format, + IN gctUINT32 ClearValue, + IN gctUINT8 ClearMask + ); + +/* Append a TILE STATUS CLEAR command to a command queue. */ +gceSTATUS +gcoHARDWARE_ClearTileStatus( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface, + IN gctUINT32 Address, + IN gctSIZE_T Bytes, + IN gceSURF_TYPE Type, + IN gctUINT32 ClearValue, + IN gctUINT8 ClearMask + ); + +gceSTATUS +gco3D_ClearHzTileStatus( + IN gco3D Engine, + IN gcsSURF_INFO_PTR Surface, + IN gcsSURF_NODE_PTR TileStatus + ); + +gceSTATUS +gcoHARDWARE_SetRenderTarget( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface + ); + +gceSTATUS +gcoHARDWARE_SetDepthBuffer( + IN gcoHARDWARE Hardware, + IN gcsSURF_INFO_PTR Surface + ); + +gceSTATUS +gcoHARDWARE_SetAPI( + IN gcoHARDWARE Hardware, + IN gceAPI Api + ); + +gceSTATUS +gcoHARDWARE_SetViewport( + IN gcoHARDWARE Hardware, + IN gctINT32 Left, + IN gctINT32 Top, + IN gctINT32 Right, + IN gctINT32 Bottom + ); + +gceSTATUS +gcoHARDWARE_SetScissors( + IN gcoHARDWARE Hardware, + IN gctINT32 Left, + IN gctINT32 Top, + IN gctINT32 Right, + IN gctINT32 Bottom + ); + +gceSTATUS +gcoHARDWARE_SetShading( + IN gcoHARDWARE Hardware, + IN gceSHADING Shading + ); + +gceSTATUS +gcoHARDWARE_SetBlendEnable( + IN gcoHARDWARE Hardware, + IN gctBOOL Enabled + ); + +gceSTATUS +gcoHARDWARE_SetBlendFunctionSource( + IN gcoHARDWARE Hardware, + IN gceBLEND_FUNCTION FunctionRGB, + IN gceBLEND_FUNCTION FunctionAlpha + ); + +gceSTATUS +gcoHARDWARE_SetBlendFunctionTarget( + IN gcoHARDWARE Hardware, + IN gceBLEND_FUNCTION FunctionRGB, + IN gceBLEND_FUNCTION FunctionAlpha + ); + +gceSTATUS +gcoHARDWARE_SetBlendMode( + IN gcoHARDWARE Hardware, + IN gceBLEND_MODE ModeRGB, + IN gceBLEND_MODE ModeAlpha + ); + +gceSTATUS +gcoHARDWARE_SetBlendColor( + IN gcoHARDWARE Hardware, + IN gctUINT8 Red, + IN gctUINT8 Green, + IN gctUINT8 Blue, + IN gctUINT8 Alpha + ); + +gceSTATUS +gcoHARDWARE_SetBlendColorX( + IN gcoHARDWARE Hardware, + IN gctFIXED_POINT Red, + IN gctFIXED_POINT Green, + IN gctFIXED_POINT Blue, + IN gctFIXED_POINT Alpha + ); + +gceSTATUS +gcoHARDWARE_SetBlendColorF( + IN gcoHARDWARE Hardware, + IN gctFLOAT Red, + IN gctFLOAT Green, + IN gctFLOAT Blue, + IN gctFLOAT Alpha + ); + +gceSTATUS +gcoHARDWARE_SetCulling( + IN gcoHARDWARE Hardware, + IN gceCULL Mode + ); + +gceSTATUS +gcoHARDWARE_SetPointSizeEnable( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetPointSprite( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetFill( + IN gcoHARDWARE Hardware, + IN gceFILL Mode + ); + +gceSTATUS +gcoHARDWARE_SetDepthCompare( + IN gcoHARDWARE Hardware, + IN gceCOMPARE DepthCompare + ); + +gceSTATUS +gcoHARDWARE_SetDepthWrite( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetDepthMode( + IN gcoHARDWARE Hardware, + IN gceDEPTH_MODE DepthMode + ); + +gceSTATUS +gcoHARDWARE_SetDepthRangeX( + IN gcoHARDWARE Hardware, + IN gceDEPTH_MODE DepthMode, + IN gctFIXED_POINT Near, + IN gctFIXED_POINT Far + ); + +gceSTATUS +gcoHARDWARE_SetDepthRangeF( + IN gcoHARDWARE Hardware, + IN gceDEPTH_MODE DepthMode, + IN gctFLOAT Near, + IN gctFLOAT Far + ); + +gceSTATUS +gcoHARDWARE_SetDepthScaleBiasX( + IN gcoHARDWARE Hardware, + IN gctFIXED_POINT DepthScale, + IN gctFIXED_POINT DepthBias + ); + +gceSTATUS +gcoHARDWARE_SetDepthScaleBiasF( + IN gcoHARDWARE Hardware, + IN gctFLOAT DepthScale, + IN gctFLOAT DepthBias + ); + +gceSTATUS +gcoHARDWARE_SetLastPixelEnable( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetDither( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetColorWrite( + IN gcoHARDWARE Hardware, + IN gctUINT8 Enable + ); + +gceSTATUS +gcoHARDWARE_SetEarlyDepth( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetStencilMode( + IN gcoHARDWARE Hardware, + IN gceSTENCIL_MODE Mode + ); + +gceSTATUS +gcoHARDWARE_SetStencilMask( + IN gcoHARDWARE Hardware, + IN gctUINT8 Mask + ); + +gceSTATUS +gcoHARDWARE_SetStencilWriteMask( + IN gcoHARDWARE Hardware, + IN gctUINT8 Mask + ); + +gceSTATUS +gcoHARDWARE_SetStencilReference( + IN gcoHARDWARE Hardware, + IN gctUINT8 Reference + ); + +gceSTATUS +gcoHARDWARE_SetStencilCompare( + IN gcoHARDWARE Hardware, + IN gceSTENCIL_WHERE Where, + IN gceCOMPARE Compare + ); + +gceSTATUS +gcoHARDWARE_SetStencilPass( + IN gcoHARDWARE Hardware, + IN gceSTENCIL_WHERE Where, + IN gceSTENCIL_OPERATION Operation + ); + +gceSTATUS +gcoHARDWARE_SetStencilFail( + IN gcoHARDWARE Hardware, + IN gceSTENCIL_WHERE Where, + IN gceSTENCIL_OPERATION Operation + ); + +gceSTATUS +gcoHARDWARE_SetStencilDepthFail( + IN gcoHARDWARE Hardware, + IN gceSTENCIL_WHERE Where, + IN gceSTENCIL_OPERATION Operation + ); + +gceSTATUS +gcoHARDWARE_SetAlphaTest( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetAlphaCompare( + IN gcoHARDWARE Hardware, + IN gceCOMPARE Compare + ); + +gceSTATUS +gcoHARDWARE_SetAlphaReference( + IN gcoHARDWARE Hardware, + IN gctUINT8 Reference + ); + +gceSTATUS +gcoHARDWARE_SetAlphaReferenceX( + IN gcoHARDWARE Hardware, + IN gctFIXED_POINT Reference + ); + +gceSTATUS +gcoHARDWARE_SetAlphaReferenceF( + IN gcoHARDWARE Hardware, + IN gctFLOAT Reference + ); + +gceSTATUS +gcoHARDWARE_BindStream( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctINT Stride, + IN gctUINT Number + ); + +gceSTATUS +gcoHARDWARE_BindIndex( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gceINDEX_TYPE IndexType + ); + +gceSTATUS +gcoHARDWARE_SetAntiAliasLine( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetAALineTexSlot( + IN gcoHARDWARE Hardware, + IN gctUINT TexSlot + ); + +gceSTATUS +gcoHARDWARE_SetAALineWidth( + IN gcoHARDWARE Hardware, + IN gctFLOAT Width + ); + + +/* Draw a number of primitives. */ +gceSTATUS +gcoHARDWARE_DrawPrimitives( + IN gcoHARDWARE Hardware, + IN gcePRIMITIVE Type, + IN gctINT StartVertex, + IN gctSIZE_T PrimitiveCount + ); + +/* Draw a number of primitives using offsets. */ +gceSTATUS +gcoHARDWARE_DrawPrimitivesOffset( + IN gcoHARDWARE Hardware, + IN gcePRIMITIVE Type, + IN gctINT32 StartOffset, + IN gctSIZE_T PrimitiveCount + ); + +/* Draw a number of indexed primitives. */ +gceSTATUS +gcoHARDWARE_DrawIndexedPrimitives( + IN gcoHARDWARE Hardware, + IN gcePRIMITIVE Type, + IN gctINT BaseVertex, + IN gctINT StartIndex, + IN gctSIZE_T PrimitiveCount + ); + +/* Draw a number of indexed primitives using offsets. */ +gceSTATUS +gcoHARDWARE_DrawIndexedPrimitivesOffset( + IN gcoHARDWARE Hardware, + IN gcePRIMITIVE Type, + IN gctINT32 BaseOffset, + IN gctINT32 StartOffset, + IN gctSIZE_T PrimitiveCount + ); + +/* Copy data into video memory. */ +gceSTATUS +gcoHARDWARE_CopyData( + IN gcoHARDWARE Hardware, + IN gcsSURF_NODE_PTR Memory, + IN gctUINT32 Offset, + IN gctCONST_POINTER Buffer, + IN gctSIZE_T Bytes + ); + +gceSTATUS +gcoHARDWARE_SetStream( + IN gcoHARDWARE Hardware, + IN gctUINT32 Index, + IN gctUINT32 Address, + IN gctUINT32 Stride + ); + +gceSTATUS +gcoHARDWARE_SetAttributes( + IN gcoHARDWARE Hardware, + IN gcsVERTEX_ATTRIBUTES_PTR Attributes, + IN gctUINT32 AttributeCount + ); + +gceSTATUS +gcoHARDWARE_QuerySamplerBase( + IN gcoHARDWARE Hardware, + OUT gctSIZE_T * VertexCount, + OUT gctINT_PTR VertexBase, + OUT gctSIZE_T * FragmentCount, + OUT gctINT_PTR FragmentBase + ); + +gceSTATUS +gcoHARDWARE_SetDepthOnly( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +gceSTATUS +gcoHARDWARE_SetCentroids( + IN gcoHARDWARE Hardware, + IN gctUINT32 Index, + IN gctPOINTER Centroids + ); +#endif /* VIVANTE_NO_3D */ + +/* Append a CLEAR command to a command queue. */ +gceSTATUS +gcoHARDWARE_Clear( + IN gcoHARDWARE Hardware, + IN gctUINT32 Address, + IN gctUINT32 Stride, + IN gctINT32 Left, + IN gctINT32 Top, + IN gctINT32 Right, + IN gctINT32 Bottom, + IN gceSURF_FORMAT Format, + IN gctUINT32 ClearValue, + IN gctUINT8 ClearMask + ); + +/* Software clear. */ +gceSTATUS +gcoHARDWARE_ClearSoftware( + IN gcoHARDWARE Hardware, + IN gctPOINTER LogicalAddress, + IN gctUINT32 Stride, + IN gctINT32 Left, + IN gctINT32 Top, + IN gctINT32 Right, + IN gctINT32 Bottom, + IN gceSURF_FORMAT Format, + IN gctUINT32 ClearValue, + IN gctUINT8 ClearMask + ); + +/* Verifies whether 2D engine is available. */ +gceSTATUS +gcoHARDWARE_Is2DAvailable( + IN gcoHARDWARE Hardware + ); + +/* Sets the software 2D renderer force flag. */ +gceSTATUS +gcoHARDWARE_UseSoftware2D( + IN gcoHARDWARE Hardware, + IN gctBOOL Enable + ); + +/* Sets the maximum number of brushes in the cache. */ +gceSTATUS +gcoHARDWARE_SetBrushLimit( + IN gcoHARDWARE Hardware, + IN gctUINT MaxCount + ); + +/* Return a pointer to the brush cache. */ +gceSTATUS +gcoHARDWARE_GetBrushCache( + IN gcoHARDWARE Hardware, + IN OUT gcoBRUSH_CACHE * BrushCache + ); + +/* Program the brush. */ +gceSTATUS +gcoHARDWARE_FlushBrush( + IN gcoHARDWARE Hardware, + IN gcoBRUSH Brush + ); + +/* Clear one or more rectangular areas. */ +gceSTATUS +gcoHARDWARE_Clear2D( + IN gcoHARDWARE Hardware, + IN gctUINT32 RectCount, + IN gcsRECT_PTR Rect, + IN gctUINT32 Color, + IN gctBOOL ColorConvert, + IN gctUINT8 FgRop, + IN gctUINT8 BgRop + ); + +/* Draw one or more Bresenham lines using a brush. */ +gceSTATUS +gcoHARDWARE_Line2D( + IN gcoHARDWARE Hardware, + IN gctUINT32 LineCount, + IN gcsRECT_PTR Position, + IN gcoBRUSH Brush, + IN gctUINT8 FgRop, + IN gctUINT8 BgRop + ); + +/* Draw one or more Bresenham lines using solid color(s). */ +gceSTATUS +gcoHARDWARE_Line2DEx( + IN gcoHARDWARE Hardware, + IN gctUINT32 LineCount, + IN gcsRECT_PTR Position, + IN gctUINT32 ColorCount, + IN gctUINT32_PTR Color32, + IN gctUINT8 FgRop, + IN gctUINT8 BgRop + ); + +/* Monochrome blit. */ +gceSTATUS +gcoHARDWARE_MonoBlit( + IN gcoHARDWARE Hardware, + IN gctPOINTER StreamBits, + IN gcsPOINT_PTR StreamSize, + IN gcsRECT_PTR StreamRect, + IN gceSURF_MONOPACK SrcStreamPack, + IN gceSURF_MONOPACK DestStreamPack, + IN gcsRECT_PTR DestRect, + IN gctUINT32 FgRop, + IN gctUINT32 BgRop + ); + +/* Get Hw status*/ +gceSTATUS +gcoHARDWARE_GetHWStatus( + IN gcoHARDWARE Hardware, + OUT gctBOOL_PTR* Idle, + OUT gctINT_PTR Count, + OUT gctINT_PTR CurrentCmdIndex + ); + +/******************************************************************************\ +******************************** gcoBUFFER Object ******************************* +\******************************************************************************/ + +/* Construct a new gcoBUFFER object. */ +gceSTATUS +gcoBUFFER_Construct( + IN gcoHAL Hal, + IN gcoHARDWARE Hardware, + IN gctSIZE_T MaxSize, + OUT gcoBUFFER * Buffer + ); + +/* Destroy an gcoBUFFER object. */ +gceSTATUS +gcoBUFFER_Destroy( + IN gcoBUFFER Buffer + ); + +/* Reserve space in a command buffer. */ +gceSTATUS +gcoBUFFER_Reserve( + IN gcoBUFFER Buffer, + IN gctSIZE_T Bytes, + IN gctBOOL Aligned, + IN gctBOOL_PTR AddressHints, + OUT gctPOINTER * Memory + ); + +/* Preserve space in a command buffer. */ +gceSTATUS +gcoBUFFER_Preserve( + IN gcoBUFFER Buffer, + IN gctSIZE_T Bytes, + IN gctBOOL Aligned + ); + +/* Write data into the command buffer. */ +gceSTATUS +gcoBUFFER_Write( + IN gcoBUFFER Buffer, + IN gctCONST_POINTER Data, + IN gctSIZE_T Bytes, + IN gctBOOL Aligned + ); + +/* Write 32-bit data into the command buffer. */ +gceSTATUS +gcoBUFFER_Write32( + IN gcoBUFFER Buffer, + IN gctUINT32 Data, + IN gctBOOL Aligned + ); + +/* Write 64-bit data into the command buffer. */ +gceSTATUS +gcoBUFFER_Write64( + IN gcoBUFFER Buffer, + IN gctUINT64 Data, + IN gctBOOL Aligned + ); + +/* Commit the command buffer. */ +gceSTATUS +gcoBUFFER_Commit( + IN gcoBUFFER Buffer, + IN gcoCONTEXT Context, + IN gcoQUEUE Queue + ); + +/*get the status of command buffer*/ +gceSTATUS +gcoBUFFER_Status( + IN gcoBUFFER Buffer, + OUT gctBOOL_PTR* Idle, + OUT gctINT_PTR Count, + OUT gctINT_PTR CurrentCmdIndex + ); + +/******************************************************************************\ +******************************** gcoCMDBUF Object ******************************* +\******************************************************************************/ + +typedef struct _gcsCOMMAND_INFO * gcsCOMMAND_INFO_PTR; + +/* Construct a new gcoCMDBUF object. */ +gceSTATUS +gcoCMDBUF_Construct( + IN gcoOS Os, + IN gcoHARDWARE Hardware, + IN gctSIZE_T Bytes, + IN gcsCOMMAND_INFO_PTR Info, + OUT gcoCMDBUF * Buffer + ); + +/* Destroy an gcoCMDBUF object. */ +gceSTATUS +gcoCMDBUF_Destroy( + IN gcoCMDBUF Buffer + ); + +/******************************************************************************\ +******************************* gcoCONTEXT Object ******************************* +\******************************************************************************/ + +gceSTATUS +gcoCONTEXT_Construct( + IN gcoOS Os, + IN gcoHARDWARE Hardware, + OUT gcoCONTEXT * Context + ); + +gceSTATUS +gcoCONTEXT_Destroy( + IN gcoCONTEXT Context + ); + +gceSTATUS +gcoCONTEXT_Buffer( + IN gcoCONTEXT Context, + IN gctUINT32 Address, + IN gctSIZE_T Count, + IN gctUINT32_PTR Data, + OUT gctBOOL_PTR Hints + ); + +gceSTATUS +gcoCONTEXT_BufferX( + IN gcoCONTEXT Context, + IN gctUINT32 Address, + IN gctSIZE_T Count, + IN gctFIXED_POINT * Data + ); + +gceSTATUS +gcoCONTEXT_PreCommit( + IN OUT gcoCONTEXT Context + ); + +gceSTATUS +gcoCONTEXT_PostCommit( + IN OUT gcoCONTEXT Context + ); + +#ifdef LINUX +#define PENDING_FREED_MEMORY_SIZE_LIMIT (4 * 1024 * 1024) +#endif + +#if MRVL_PRE_ALLOCATE_CTX_BUFFER + +/******************************************************************************\ +******************************** gcoCTXBUF Object ******************************* +\******************************************************************************/ + +/* Construct a new gcoCTXBUF object. */ +gceSTATUS +gcoCTXBUF_Construct( + IN gcoOS Os, + IN gcoHARDWARE Hardware, + IN gctSIZE_T Bytes, + OUT gcoCTXBUF * Buffer + ); + +/* Destroy an gcoCTXBUF object. */ +gceSTATUS +gcoCTXBUF_Destroy( + IN gcoCTXBUF Buffer + ); + +#endif + +/******************************************************************************\ +********************************* gcoHAL object ********************************* +\******************************************************************************/ + +struct _gcoHAL +{ + /* The object. */ + gcsOBJECT object; + + /* Context passed in during creation. */ + gctPOINTER context; + + /* Pointer to an gcoOS object. */ + gcoOS os; + + /* Pointer to an gcoHARDWARE object. */ + gcoHARDWARE hardware; + + /* Pointer to the gco2D and gco3D objects. */ + gco2D engine2D; + gcoVG engineVG; + gco3D engine3D; + + /* Pointer to te gcoDUMP object. */ + gcoDUMP dump; + +#if VIVANTE_PROFILER + gcsPROFILER profiler; +#endif + + /* Process handle */ + gctHANDLE process; + + /* Pointer to version string */ + gctCONST_STRING version; + +#if MRVL_BENCH + /* timer object for bench mark */ + gcoAPIBENCH apiBench; +#endif + +#if MRVL_OPTI_USE_RESERVE_MEMORY + gctUINT32 reserveMemorySwitchNum; + gctBOOL bReserveMemoryPending; + gcoSTREAM reserveMemory[RESERVE_MEMORY_NUM]; + gctUINT32 reserveMemoryIndex; + gctSIGNAL reserveMemorySignals[RESERVE_MEMORY_NUM]; + gctUINT32 reserveMemoryOffset; + gctUINT32 reserveMemorySize[RESERVE_MEMORY_NUM]; + gctUINT32 streamAlign; + gctUINT32 indexAlign; + gctBOOL DisableReserveMemory; +#endif +}; + + +/******************************************************************************\ +********************************* gcoSURF object ******************************** +\******************************************************************************/ + +typedef struct _gcsSURF_NODE +{ + /* Surface memory pool. */ + gcePOOL pool; + + /* Lock count for the surface. */ + gctINT lockCount; + + /* If not zero, the node is locked in the kernel. */ + gctBOOL lockedInKernel; + + /* Number of planes in the surface for planar format support. */ + gctUINT count; + + /* Node valid flag for the surface pointers. */ + gctBOOL valid; + + /* The physical addresses of the surface. */ + gctUINT32 physical; + gctUINT32 physical2; + gctUINT32 physical3; + + /* The logical addresses of the surface. */ + gctUINT8_PTR logical; + gctUINT8_PTR logical2; + gctUINT8_PTR logical3; + + /* Linear size and filler for tile status. */ + gctSIZE_T size; + gctUINT32 filler; + gctBOOL firstLock; + + union _gcuSURF_NODE_LIST + { + /* Allocated through HAL. */ + struct _gcsMEM_NODE_NORMAL + { + gcuVIDMEM_NODE_PTR node; +#ifdef __QNXNTO__ + gctUINT32 bytes; +#endif + } + normal; + + /* Wrapped around user-allocated surface (gcvPOOL_USER). */ + struct _gcsMEM_NODE_WRAPPED + { + gctBOOL logicalMapped; + gctPOINTER mappingInfo; + } + wrapped; + } + u; +} +gcsSURF_NODE; + +typedef struct _gcsSURF_INFO +{ + /* Type usage and format of surface. */ + gceSURF_TYPE type; + gceSURF_FORMAT format; + + /* Surface size. */ + gcsRECT rect; + gctUINT alignedWidth; + gctUINT alignedHeight; + gctBOOL is16Bit; + + /* Rotation flag. */ + gceSURF_ROTATION rotation; + gceORIENTATION orientation; + + /* Surface stride and size. */ + gctUINT stride; + gctUINT size; + + /* YUV planar surface parameters. */ + gctUINT uOffset; + gctUINT vOffset; + gctUINT uStride; + gctUINT vStride; + + /* Video memory node for surface. */ + gcsSURF_NODE node; + + /* Samples. */ + gcsSAMPLES samples; + gctBOOL vaa; + + /* Tile status. */ + gctBOOL tileStatusDisabled; + gctBOOL superTiled; + gctUINT32 clearValue; + + /* Hierarchical Z buffer pointer. */ + gcsSURF_NODE hzNode; + + /* face for resolve */ + gctUINT face; + +} +gcsSURF_INFO; + +struct _gcoSURF +{ + /* Object. */ + gcsOBJECT object; + + /* Pointer to an gcoHAL object. */ + gcoHAL hal; + + /* Surface information structure. */ + struct _gcsSURF_INFO info; + + /* Depth of the surface in planes. */ + gctUINT depth; + +#ifndef VIVANTE_NO_3D + gctBOOL resolvable; +#endif /* VIVANTE_NO_3D */ + + /* Video memory node for tile status. */ + gcsSURF_NODE tileStatusNode; + gcsSURF_NODE hzTileStatusNode; + + /* Surface color type. */ + gceSURF_COLOR_TYPE colorType; + + /* Automatic stride calculation. */ + gctBOOL autoStride; + + /* User pointers for the surface wrapper. */ + gctPOINTER logical; + gctUINT32 physical; + + /* Reference count of surface. */ + gctINT32 referenceCount; +}; + +/******************************************************************************\ +******************************** gcoQUEUE Object ******************************* +\******************************************************************************/ + +/* Construct a new gcoQUEUE object. */ +gceSTATUS +gcoQUEUE_Construct( + IN gcoOS Os, + OUT gcoQUEUE * Queue + ); + +/* Destroy a gcoQUEUE object. */ +gceSTATUS +gcoQUEUE_Destroy( + IN gcoQUEUE Queue + ); + +/* Append an event to a gcoQUEUE object. */ +gceSTATUS +gcoQUEUE_AppendEvent( + IN gcoQUEUE Queue, + IN gcsHAL_INTERFACE * Interface + ); + +/* Commit and event queue. */ +gceSTATUS +gcoQUEUE_Commit( + IN gcoQUEUE Queue + ); + +#ifdef __cplusplus +} +#endif + +#endif /* __gc_hal_user_h_ */ diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_brush.h b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_brush.h new file mode 100644 index 0000000..33381cf --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_brush.h @@ -0,0 +1,139 @@ +/**************************************************************************** +* +* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +* +* The material in this file is confidential and contains trade secrets +* of Vivante Corporation. This is proprietary information owned by +* Vivante Corporation. No part of this work may be disclosed, +* reproduced, copied, transmitted, or used in any way for any purpose, +* without the express written permission of Vivante Corporation. +* +***************************************************************************** +* +* +*****************************************************************************/ + + + + +#ifndef __gc_hal_user_brush_h_ +#define __gc_hal_user_brush_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/******************************************************************************\ +***************************** gcoBRUSH_CACHE Object ***************************** +\******************************************************************************/ + +/* Create an gcoBRUSH_CACHE object. */ +gceSTATUS +gcoBRUSH_CACHE_Construct( + IN gcoHAL Hal, + gcoBRUSH_CACHE * BrushCache + ); + +/* Destroy an gcoBRUSH_CACHE object. */ +gceSTATUS +gcoBRUSH_CACHE_Destroy( + IN gcoBRUSH_CACHE BrushCache + ); + +/* Sets the maximum number of brushes in the cache. */ +gceSTATUS +gcoBRUSH_CACHE_SetBrushLimit( + IN gcoBRUSH_CACHE BrushCache, + IN gctUINT MaxCount + ); + +/* Compute the brush ID based on the brush data. */ +gceSTATUS +gcoBRUSH_CACHE_GetBrushID( + IN gcoBRUSH_CACHE BrushCache, + IN gctPOINTER BrushData, + IN gctUINT32 DataCount, + IN OUT gctUINT32 * BrushID + ); + +/* Find a matching brush by the passed brush data set and return a pointer + to the brush. If a matching brush was found, its usage counter is + automatically incremented. Call gcoBRUSH_CACHE_DeleteBrush + to release the brush. */ +gceSTATUS +gcoBRUSH_CACHE_GetBrush( + IN gcoBRUSH_CACHE BrushCache, + IN gctUINT32 BrushID, + IN gctPOINTER BrushData, + IN gctUINT32 DataCount, + IN OUT gcoBRUSH * Brush + ); + +/* Add a brush to the brush cache. */ +gceSTATUS +gcoBRUSH_CACHE_AddBrush( + IN gcoBRUSH_CACHE BrushCache, + IN gcoBRUSH Brush, + IN gctUINT32 BrushID, + IN gctBOOL NeedMemory + ); + +/* Remove a brush from the brush cache. */ +gceSTATUS +gcoBRUSH_CACHE_DeleteBrush( + IN gcoBRUSH_CACHE BrushCache, + IN gcoBRUSH Brush + ); + +/* Flush the brush. */ +gceSTATUS +gcoBRUSH_CACHE_FlushBrush( + IN gcoBRUSH_CACHE BrushCache, + IN gcoBRUSH Brush + ); + + +/******************************************************************************\ +******************************** gcoBRUSH Object ******************************* +\******************************************************************************/ + +/* Frees all resources held up the specified gcoBRUSH object. */ +gceSTATUS +gcoBRUSH_Delete( + IN gcoBRUSH Brush + ); + +/* Returns a buffer fileld with complete set of brush parameters. */ +gceSTATUS +gcoBRUSH_GetBrushData( + IN gcoBRUSH Brush, + IN OUT gctPOINTER BrushData, + IN OUT gctUINT32 * DataCount + ); + +/* Flush the brush. */ +gceSTATUS +gcoBRUSH_FlushBrush( + IN gcoBRUSH Brush, + IN gctBOOL Upload, + IN gcsSURF_NODE_PTR Node + ); + + +/******************************************************************************\ +********************************** gco2D Object ********************************* +\******************************************************************************/ + +/* Return a pointer to the brush cache. */ +gceSTATUS +gco2D_GetBrushCache( + IN gco2D Hardware, + IN OUT gcoBRUSH_CACHE * BrushCache + ); + +#ifdef __cplusplus +} +#endif + +#endif /* __gc_hal_user_brush_h_ */ + diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_compiler.h b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_compiler.h new file mode 100644 index 0000000..87925bc --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_compiler.h @@ -0,0 +1,664 @@ +/**************************************************************************** +* +* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +* +* The material in this file is confidential and contains trade secrets +* of Vivante Corporation. This is proprietary information owned by +* Vivante Corporation. No part of this work may be disclosed, +* reproduced, copied, transmitted, or used in any way for any purpose, +* without the express written permission of Vivante Corporation. +* +***************************************************************************** +* +* +*****************************************************************************/ + + + + +#ifndef __gc_hal_user_compiler_h_ +#define __gc_hal_user_compiler_h_ + +#include "gc_hal_compiler.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/******************************************************************************\ +|******************************* SHADER LANGUAGE ******************************| +\******************************************************************************/ + +/* Special register indices. */ +#define gcSL_POSITION ((gctSIZE_T) -1) +#define gcSL_POINT_SIZE ((gctSIZE_T) -2) +#define gcSL_COLOR ((gctSIZE_T) -3) +#define gcSL_FRONT_FACING ((gctSIZE_T) -4) +#define gcSL_POINT_COORD ((gctSIZE_T) -5) +#define gcSL_POSITION_W ((gctSIZE_T) -6) + +/* Special code generation indices. */ +#define gcSL_CG_TEMP1 112 +#define gcSL_CG_TEMP1_X 113 +#define gcSL_CG_TEMP1_XY 114 +#define gcSL_CG_TEMP1_XYZ 115 +#define gcSL_CG_TEMP1_XYZW 116 +#define gcSL_CG_TEMP2 117 +#define gcSL_CG_TEMP2_X 118 +#define gcSL_CG_TEMP2_XY 119 +#define gcSL_CG_TEMP2_XYZ 120 +#define gcSL_CG_TEMP2_XYZW 121 +#define gcSL_CG_TEMP3 122 +#define gcSL_CG_TEMP3_X 123 +#define gcSL_CG_TEMP3_XY 124 +#define gcSL_CG_TEMP3_XYZ 125 +#define gcSL_CG_TEMP3_XYZW 126 +#define gcSL_CG_CONSTANT 127 + +/* 4-bit enable bits. */ +#define gcdSL_TARGET_Enable 0 : 4 +/* Indexed addressing mode of type gcSL_INDEXED. */ +#define gcdSL_TARGET_Indexed 4 : 4 +/* 4-bit condition of type gcSL_CONDITION. */ +#define gcdSL_TARGET_Condition 8 : 4 +/* Target format of type gcSL_FORMAT. */ +#define gcdSL_TARGET_Format 12 : 2 +/* Flag whether source0 index has been patched. */ +#define gcdSL_TARGET_Source0Patched 14 : 1 +/* Flag whether source1 index has been patched. */ +#define gcdSL_TARGET_Source1Patched 15 : 1 + +#define gcmSL_TARGET_GET(Value, Field) \ + gcmGETBITS(Value, gctUINT16, gcdSL_TARGET_##Field) + +#define gcmSL_TARGET_SET(Value, Field, NewValue) \ + gcmSETBITS(Value, gctUINT16, gcdSL_TARGET_##Field, NewValue) + +/* Register type of type gcSL_TYPE. */ +#define gcdSL_SOURCE_Type 0 : 3 +/* Indexed register swizzle. */ +#define gcdSL_SOURCE_Indexed 3 : 3 +/* Source format of type gcSL_FORMAT. */ +#define gcdSL_SOURCE_Format 6 : 2 +/* Swizzle fields of type gcSL_SWIZZLE. */ +#define gcdSL_SOURCE_Swizzle 8 : 8 +#define gcdSL_SOURCE_SwizzleX 8 : 2 +#define gcdSL_SOURCE_SwizzleY 10 : 2 +#define gcdSL_SOURCE_SwizzleZ 12 : 2 +#define gcdSL_SOURCE_SwizzleW 14 : 2 + +#define gcmSL_SOURCE_GET(Value, Field) \ + gcmGETBITS(Value, gctUINT16, gcdSL_SOURCE_##Field) + +#define gcmSL_SOURCE_SET(Value, Field, NewValue) \ + gcmSETBITS(Value, gctUINT16, gcdSL_SOURCE_##Field, NewValue) + +/* Index of register. */ +#define gcdSL_INDEX_Index 0 : 14 +/* Constant value. */ +#define gcdSL_INDEX_ConstValue 14 : 2 + +#define gcmSL_INDEX_GET(Value, Field) \ + gcmGETBITS(Value, gctUINT16, gcdSL_INDEX_##Field) + +#define gcmSL_INDEX_SET(Value, Field, NewValue) \ + gcmSETBITS(Value, gctUINT16, gcdSL_INDEX_##Field, NewValue) + +/* Structure that defines a gcSL instruction. */ +typedef struct _gcSL_INSTRUCTION +{ + /* Opcode of type gcSL_OPCODE. */ + gctUINT16 opcode; + + /* Opcode condition and target write enable bits of type gcSL_TARGET. */ + gctUINT16 temp; + + /* 16-bit temporary register index. */ + gctUINT16 tempIndex; + + /* Indexed register for destination. */ + gctUINT16 tempIndexed; + + /* Type of source 0 operand of type gcSL_SOURCE. */ + gctUINT16 source0; + + /* 16-bit register index for source 0 operand of type gcSL_INDEX. */ + gctUINT16 source0Index; + + /* Indexed register for source 0 operand. */ + gctUINT16 source0Indexed; + + /* Type of source 1 operand of type gcSL_SOURCE. */ + gctUINT16 source1; + + /* 16-bit register index for source 1 operand of type gcSL_INDEX. */ + gctUINT16 source1Index; + + /* Indexed register for source 1 operand. */ + gctUINT16 source1Indexed; +} +* gcSL_INSTRUCTION; + +/******************************************************************************\ +|*********************************** SHADERS **********************************| +\******************************************************************************/ + +/* Structure the defines an attribute (input) for a shader. */ +struct _gcATTRIBUTE +{ + /* The object. */ + gcsOBJECT object; + + /* Index of the attribute. */ + gctUINT16 index; + + /* Type of the attribute. */ + gcSHADER_TYPE type; + + /* Number of array elements for this attribute. */ + gctSIZE_T arraySize; + + /* Flag to indicate this attribute is used as a texture coordinate. */ + gctBOOL isTexture; + + /* Flag to indicate this attribute is used as a position. */ + gctBOOL isPosition; + + /* Flag to indicate this attribute is enabeld or not. */ + gctBOOL enabled; + + /* Assigned input register index. */ + gctINT inputIndex; + + /* Length of the attribute name. */ + gctSIZE_T nameLength; + + /* The attribute name. */ + char name[1]; +}; + +/* Sampel structure, but inside a binary. */ +typedef struct _gcBINARY_ATTRIBUTE +{ + /* Type for this attribute of type gcATTRIBUTE_TYPE. */ + gctINT8 type; + + /* Flag to indicate this attribute is used as a texture coordinate. */ + gctINT8 isTexture; + + /* Number of array elements for this attribute. */ + gctINT16 arraySize; + + /* Length of the attribute name. */ + gctINT16 nameLength; + + /* The attribute name. */ + char name[1]; +} +* gcBINARY_ATTRIBUTE; + +/* Structure that defines an uniform (constant register) for a shader. */ +struct _gcUNIFORM +{ + /* The object. */ + gcsOBJECT object; + + /* Pointer to the gcoHAL object. */ + gcoHAL hal; + + /* Index of the uniform. */ + gctUINT16 index; + + /* Type of the uniform. */ + gcSHADER_TYPE type; + + /* Number of array elements for this uniform. */ + gctINT arraySize; + + /* Physically assigned values. */ + gctINT physical; + gctUINT8 swizzle; + gctUINT32 address; + + /* Length of the uniform name. */ + gctSIZE_T nameLength; + + /* The uniform name. */ + char name[1]; +}; + +/* Same structure, but inside a binary. */ +typedef struct _gcBINARY_UNIFORM +{ + /* Uniform type of type gcUNIFORM_TYPE. */ + gctINT16 type; + + /* Number of array elements for this uniform. */ + gctINT16 arraySize; + + /* Length of the uniform name. */ + gctINT16 nameLength; + + /* The uniform name. */ + char name[1]; +} +* gcBINARY_UNIFORM; + +/* Structure that defines an output for a shader. */ +struct _gcOUTPUT +{ + /* The object. */ + gcsOBJECT object; + + /* Type for this output. */ + gcSHADER_TYPE type; + + /* Number of array elements for this output. */ + gctSIZE_T arraySize; + + /* Temporary register index that holds the output value. */ + gctUINT16 tempIndex; + + /* Converted to physical register. */ + gctBOOL physical; + + /* Length of the output name. */ + gctSIZE_T nameLength; + + /* The output name. */ + char name[1]; +}; + +/* Same structure, but inside a binary. */ +typedef struct _gcBINARY_OUTPUT +{ + /* Type for this output. */ + gctINT8 type; + + /* Number of array elements for this output. */ + gctINT8 arraySize; + + /* Temporary register index that holds the output value. */ + gctUINT16 tempIndex; + + /* Length of the output name. */ + gctINT16 nameLength; + + /* The output name. */ + char name[1]; +} +* gcBINARY_OUTPUT; + +/* Structure that defines a variable for a shader. */ +struct _gcVARIABLE +{ + /* The object. */ + gcsOBJECT object; + + /* Type for this output. */ + gcSHADER_TYPE type; + + /* Number of array elements for this output. */ + gctSIZE_T arraySize; + + /* Temporary register index that holds the variable value. */ + gctUINT16 tempIndex; + + /* Length of the output name. */ + gctSIZE_T nameLength; + + /* The output name. */ + char name[1]; +}; + +typedef struct _gcsFUNCTION_ARGUMENT +{ + gctUINT16 index; + gctUINT8 enable; + gctUINT8 qualifier; +} +gcsFUNCTION_ARGUMENT, +* gcsFUNCTION_ARGUMENT_PTR; + +struct _gcsFUNCTION +{ + gcsOBJECT object; + gcoOS os; + + gctSIZE_T argumentCount; + gcsFUNCTION_ARGUMENT_PTR arguments; + + gctUINT16 label; + + /* Local variables. */ + gctSIZE_T variableCount; + gcVARIABLE * variables; + + gctUINT codeStart; + gctUINT codeCount; + + gctSIZE_T nameLength; + char name[1]; +}; + +/* Index into current instruction. */ +typedef enum _gcSHADER_INSTRUCTION_INDEX +{ + gcSHADER_OPCODE, + gcSHADER_SOURCE0, + gcSHADER_SOURCE1, +} +gcSHADER_INSTRUCTION_INDEX; + +typedef struct _gcSHADER_LINK * gcSHADER_LINK; + +/* Structure defining a linked references for a label. */ +struct _gcSHADER_LINK +{ + gcSHADER_LINK next; + gctUINT referenced; +}; + +typedef struct _gcSHADER_LABEL * gcSHADER_LABEL; + +/* Structure defining a label. */ +struct _gcSHADER_LABEL +{ + gcSHADER_LABEL next; + gctUINT label; + gctUINT defined; + gcSHADER_LINK referenced; +}; + +/* The structure that defines the gcSHADER object to the outside world. */ +struct _gcSHADER +{ + /* The base object. */ + gcsOBJECT object; + + /* Pointer to an gcoHAL object. */ + gcoHAL hal; + + /* Type of shader. */ + gctINT type; + + /* Attributes. */ + gctSIZE_T attributeCount; + gcATTRIBUTE * attributes; + + /* Uniforms. */ + gctSIZE_T uniformCount; + gcUNIFORM * uniforms; + gctINT samplerIndex; + + /* Outputs. */ + gctSIZE_T outputCount; + gcOUTPUT * outputs; + + /* Global variables. */ + gctSIZE_T variableCount; + gcVARIABLE * variables; + + /* Functions. */ + gctSIZE_T functionCount; + gcFUNCTION * functions; + gcFUNCTION currentFunction; + + /* Code. */ + gctSIZE_T codeCount; + gctUINT lastInstruction; + gcSHADER_INSTRUCTION_INDEX instrIndex; + gcSHADER_LABEL labels; + gcSL_INSTRUCTION code; + + /* Optimization option. */ + gctUINT optimizationOption; + + /* has loop ? */ + gctBOOL hasLoop; +}; + +/******************************************************************************\ +|************************* gcSL_BRANCH_LIST structure. ************************| +\******************************************************************************/ + +typedef struct _gcSL_BRANCH_LIST * gcSL_BRANCH_LIST; + +struct _gcSL_BRANCH_LIST +{ + /* Pointer to next gcSL_BRANCH_LIST structure in list. */ + gcSL_BRANCH_LIST next; + + /* Pointer to generated instruction. */ + gctUINT ip; + + /* Target instruction for branch. */ + gctUINT target; + + /* Flag whether this is a branch or a call. */ + gctBOOL call; +}; + +/******************************************************************************\ +|**************************** gcLINKTREE structure. ***************************| +\******************************************************************************/ + +typedef struct _gcsLINKTREE_LIST * gcsLINKTREE_LIST_PTR; + +/* Structure that defines the linked list of dependencies. */ +typedef struct _gcsLINKTREE_LIST +{ + /* Pointer to next dependent register. */ + gcsLINKTREE_LIST_PTR next; + + /* Type of dependent register. */ + gcSL_TYPE type; + + /* Index of dependent register. */ + gctINT index; + + /* Reference counter. */ + gctINT counter; +} +gcsLINKTREE_LIST; + +/* Structure that defines the dependencies for an attribute. */ +typedef struct _gcLINKTREE_ATTRIBUTE +{ + /* In-use flag. */ + gctBOOL inUse; + + /* Instruction location the attribute was last used. */ + gctINT lastUse; + + /* A linked list of all temporary registers using this attribute. */ + gcsLINKTREE_LIST_PTR users; +} +* gcLINKTREE_ATTRIBUTE; + +/* Structure that defines the dependencies for a temporary register. */ +typedef struct _gcLINKTREE_TEMP +{ + /* In-use flag. */ + gctBOOL inUse; + + /* Usage flags for the temporary register. */ + gctUINT8 usage; + + /* True if the reghister is used as an index. */ + gctBOOL isIndex; + + /* Instruction locations that defines the temporary register. */ + gcsLINKTREE_LIST_PTR defined; + + /* Instruction location the temporary register was last used. */ + gctINT lastUse; + + /* Dependencies for the temporary register. */ + gcsLINKTREE_LIST_PTR dependencies; + + /* Whether the register holds a constant. */ + gctINT8 constUsage[4]; + gctFLOAT constValue[4]; + + /* A linked list of all registers using this temporary register. */ + gcsLINKTREE_LIST_PTR users; + + /* Physical register this temporary register is assigned to. */ + gctINT assigned; + gctUINT8 swizzle; + gctINT shift; + + /* Function arguments. */ + gcFUNCTION owner; + gceINPUT_OUTPUT inputOrOutput; + + /* Variable in shader's symbol table. */ + gcVARIABLE variable; +} +* gcLINKTREE_TEMP; + +/* Structure that defines the outputs. */ +typedef struct _gcLINKTREE_OUTPUT +{ + /* In-use flag. */ + gctBOOL inUse; + + /* Temporary register holding the output value. */ + gctINT tempHolding; + + /* Fragment attribute linked to this vertex output. */ + gctINT fragmentAttribute; + gctINT fragmentIndex; +} +* gcLINKTREE_OUTPUT; + +typedef struct _gcsCODE_CALLER *gcsCODE_CALLER_PTR; +typedef struct _gcsCODE_CALLER +{ + gcsCODE_CALLER_PTR next; + + gctINT caller; +} +gcsCODE_CALLER; + +typedef struct _gcsCODE_HINT +{ + /* Pointer to function to which this code belongs. */ + gcFUNCTION owner; + + /* Callers to this instruction. */ + gcsCODE_CALLER_PTR callers; + + /* Nesting of call. */ + gctINT callNest; +} +gcsCODE_HINT, *gcsCODE_HINT_PTR; + +/* Structure that defines the entire life and dependency for a shader. */ +typedef struct _gcLINKTREE +{ + /* Pointer to an gcoOS object. */ + gcoOS os; + + /* Pointer to the gcSHADER object. */ + gcSHADER shader; + + /* Number of attributes. */ + gctSIZE_T attributeCount; + + /* Attributes. */ + gcLINKTREE_ATTRIBUTE attributeArray; + + /* Number of temporary registers. */ + gctSIZE_T tempCount; + + /* Temporary registers. */ + gcLINKTREE_TEMP tempArray; + + /* Number of outputs. */ + gctSIZE_T outputCount; + + /* Outputs. */ + gcLINKTREE_OUTPUT outputArray; + + /* Uniform usage. */ + gctSIZE_T uniformUsage; + + /* Resource allocation passed. */ + gctBOOL physical; + + /* Branch list. */ + gcSL_BRANCH_LIST branch; + + /* Code hints. */ + gcsCODE_HINT_PTR hints; +} +* gcLINKTREE; + +/* Generate hardware states. */ +gceSTATUS +gcLINKTREE_GenerateStates( + IN gcLINKTREE Tree, + IN gceSHADER_FLAGS Flags, + IN OUT gctSIZE_T * StateBufferSize, + IN OUT gctPOINTER * StateBuffer, + OUT gcsHINT_PTR * Hints + ); + +typedef struct _gcsCODE_GENERATOR gcsCODE_GENERATOR; +typedef struct _gcsCODE_GENERATOR * gcsCODE_GENERATOR_PTR; + +gctUINT +gcsCODE_GENERATOR_GetIP( + gcsCODE_GENERATOR_PTR CodeGen + ); + +typedef gctBOOL (*gctSL_FUNCTION_PTR)( + IN gcLINKTREE Tree, + IN gcsCODE_GENERATOR_PTR CodeGen, + IN gcSL_INSTRUCTION Instruction, + IN OUT gctUINT32 * States + ); + +typedef struct _gcsSL_PATTERN gcsSL_PATTERN; +typedef struct _gcsSL_PATTERN * gcsSL_PATTERN_PTR; +struct _gcsSL_PATTERN +{ + /* Positive: search index, aproaching zero. + Negative: code generation index aproaching zero. */ + gctINT count; + + /* Opcode. */ + gctUINT opcode; + + /* Destination reference number. */ + gctINT8 dest; + + /* Source 0 reference number. */ + gctINT8 source0; + + /* Source 1 reference number. */ + gctINT8 source1; + + /* Source 2 reference number. */ + gctINT8 source2; + + /* Sampler reference number. */ + gctINT8 sampler; + + /* Code generation function. */ + gctSL_FUNCTION_PTR function; +}; + +gctSIZE_T +gcSHADER_GetHintSize( + void + ); + +#ifdef __cplusplus +} +#endif + +#endif /* __gc_hal_user_compiler_h_ */ + diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_context.h b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_context.h new file mode 100644 index 0000000..10c0564 --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_context.h @@ -0,0 +1,199 @@ +/**************************************************************************** +* +* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +* +* The material in this file is confidential and contains trade secrets +* of Vivante Corporation. This is proprietary information owned by +* Vivante Corporation. No part of this work may be disclosed, +* reproduced, copied, transmitted, or used in any way for any purpose, +* without the express written permission of Vivante Corporation. +* +***************************************************************************** +* +* +*****************************************************************************/ + + + + +#ifndef __gc_hal_user_context_h_ +#define __gc_hal_user_context_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +struct _gcoCTXBUF +{ + /* The object. */ + gcsOBJECT object; + + /* Pointer to gcoOS object. */ + gcoOS os; + + /* Pointer to gcoHARDWARE object. */ + gcoHARDWARE hardware; + + /* Physical address of context buffer. */ + gctPHYS_ADDR physical; + + /* Logical address of context buffer. */ + gctPOINTER logical; + + /* Number of bytes in context buffer. */ + gctSIZE_T bytes; +}; + +/* gcoCONTEXT structure that hold the current context. */ +struct _gcoCONTEXT +{ + /* Object. */ + gcsOBJECT object; + + /* Pointer to gcoOS object. */ + gcoOS os; + + /* Pointer to gcoHARDWARE object. */ + gcoHARDWARE hardware; + + /* Context ID. */ + gctUINT64 id; + + /* State mapping. */ + gctUINT32_PTR map; + gctSIZE_T stateCount; + + /* State hinting. */ + gctUINT8_PTR hint; + gctUINT8 hintValue; + gctSIZE_T hintCount; + + /* Context buffer. */ + gctUINT32_PTR buffer; + gctUINT32 pipe3DIndex; + gctUINT32 pipe2DIndex; + gctUINT32 linkIndex; + gctUINT32 inUseIndex; + gctSIZE_T bufferSize; + + /* Context buffer used for commitment. */ +#if MRVL_PRE_ALLOCATE_CTX_BUFFER + /* Array of phisical context buffers and their signals. */ + gcoCTXBUF ctxbufArray[gcdCTXBUF_SIZE_DEFAULT]; + gctSIGNAL ctxbufSignal[gcdCTXBUF_SIZE_DEFAULT]; + /* Real number of context buffers pre-allocated. */ + gctINT ctxbufSize; + /* Current context buffer. */ + gctINT ctxbufIndex; +#else + gctSIZE_T bytes; + gctPHYS_ADDR physical; +#endif + gctPOINTER logical; + + /* Pointer to final LINK command. */ + gctPOINTER link; + + /* Requested pipe select for context. */ + gctUINT32 initialPipe; + gctUINT32 entryPipe; + gctUINT32 currentPipe; + + /* Flag to specify whether PostCommit needs to be called. */ + gctBOOL postCommit; + + /* Busy flag. */ + volatile gctBOOL * inUse; + + /* Variables used for building state buffer. */ + gctUINT32 lastAddress; + gctSIZE_T lastSize; + gctUINT32 lastIndex; + gctBOOL lastFixed; + + /* Hint array. */ + gctUINT32_PTR hintArray; + gctUINT32_PTR hintIndex; + + /* Skip flag */ + gctBOOL skipContext; +}; + +struct _gcoCMDBUF +{ + /* The object. */ + gcsOBJECT object; + + /* Pointer to gcoOS object. */ + gcoOS os; + + /* Pointer to gcoHARDWARE object. */ + gcoHARDWARE hardware; + + /* Physical address of command buffer. */ + gctPHYS_ADDR physical; + + /* Logical address of command buffer. */ + gctPOINTER logical; + + /* Number of bytes in command buffer. */ + gctSIZE_T bytes; + + /* Start offset into the command buffer. */ + gctUINT32 startOffset; + + /* Current offset into the command buffer. */ + gctUINT32 offset; + + /* Number of free bytes in command buffer. */ + gctSIZE_T free; + +#if gcdSECURE_USER + /* Table of offsets that define the physical addresses to be mapped. */ + gctUINT32_PTR hintTable; + + /* Current index into map table. */ + gctUINT32_PTR hintIndex; + + /* Commit index for map table. */ + gctUINT32_PTR hintCommit; +#endif +}; + +typedef struct _gcsQUEUE * gcsQUEUE_PTR; + +typedef struct _gcsQUEUE +{ + /* Pointer to next gcsQUEUE structure. */ + gcsQUEUE_PTR next; + +#ifdef __QNXNTO__ + /* Size of this object. */ + gctSIZE_T bytes; +#endif + + /* Event information. */ + gcsHAL_INTERFACE iface; +} +gcsQUEUE; + +/* Event queue. */ +struct _gcoQUEUE +{ + /* The object. */ + gcsOBJECT object; + + /* Pointer to gcoOS object. */ + gcoOS os; + + /* Pointer to current event queue. */ + gcsQUEUE_PTR head; + gcsQUEUE_PTR tail; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* __gc_hal_user_context_h_ */ + diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_precomp.h b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_precomp.h new file mode 100644 index 0000000..9d26b92 --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_precomp.h @@ -0,0 +1,36 @@ +/**************************************************************************** +* +* Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +* +* The material in this file is confidential and contains trade secrets +* of Vivante Corporation. This is proprietary information owned by +* Vivante Corporation. No part of this work may be disclosed, +* reproduced, copied, transmitted, or used in any way for any purpose, +* without the express written permission of Vivante Corporation. +* +***************************************************************************** +* +* +*****************************************************************************/ + + + + +#ifndef __gc_hal_user_precomp_h__ +#define __gc_hal_user_precomp_h__ + +#if !defined(HAL_EXPORTS) +# define HAL_EXPORTS +#endif + +#include "gc_hal_user.h" + +#ifndef VIVANTE_NO_3D +#include "gc_hal_compiler.h" +#include "gc_hal_user_compiler.h" +#endif /* VIVANTE_NO_3D */ + +#include "gc_hal_profiler.h" + +#endif /* __gc_hal_user_precomp_h__ */ + diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_queue.h b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_queue.h new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/hal/user/gc_hal_user_queue.h @@ -0,0 +1 @@ + diff --git a/kernel_drivers/gc600_driver_dove/galcore_ko_src/makefile.linux.def b/kernel_drivers/gc600_driver_dove/galcore_ko_src/makefile.linux.def new file mode 100644 index 0000000..2057760 --- /dev/null +++ b/kernel_drivers/gc600_driver_dove/galcore_ko_src/makefile.linux.def @@ -0,0 +1,358 @@ +############################################################################## +# +# Copyright (c) 2005 - 2010 by Vivante Corp. All rights reserved. +# +# The material in this file is confidential and contains trade secrets +# of Vivante Corporation. This is proprietary information owned by +# Vivante Corporation. No part of this work may be disclosed, +# reproduced, copied, transmitted, or used in any way for any purpose, +# without the express written permission of Vivante Corporation. +# +############################################################################## +# +# +############################################################################## + + +# +# Common inlude file for Linux build. +# + +################################################################ +# Arch. + +ARCH_TYPE ?= arm +CPU_TYPE ?= arm920 +CPU_ARCH ?= 0 +STATIC_LINK ?= 0 +EGL_API_FB ?= 0 +USE_VDK ?= 0 +USE_PROFILER ?= 0 +USE_SW_FB ?= 0 +USE_3D_VG =1 +ABI ?= 0 +ANDROID ?= 0 +EGL_API_ANDROID ?= 0 +ANDROID_VERSION_ECLAIR ?= 0 +ENUM_WORKAROUND ?= 0 +ENDIANNESS ?= +QNX ?= 0 +LINUX_OABI ?= 0 +USE_ARMCC ?= 0 + +ifeq ($(LINUX_OABI), 1) +ABI ?= 0 +else +ABI ?= aapcs-linux +endif + +################################################################ +# Toolchain. + +ifeq ($(USE_ARMCC),1) + ARM_BASE ?= /home/software/ARM + ARM_VERSION ?= 4.0/650 + CROSS_COMPILE ?= $(ARM_BASE)/RVCT/Programs/$(ARM_VERSION)/linux-pentium/arm + CFLAGS += -I$(ARM_BASE)/RVCT/Data/$(ARM_VERSION)/include/unix + CC := $(CROSS_COMPILE)cc + CXX := $(CROSS_COMPILE)cc + AR := $(CROSS_COMPILE)ar + AS := $(CROSS_COMPILE)as + LD := $(CROSS_COMPILE)link +else + CROSS_COMPILE ?= arm-none-linux-gnueabi- + CC := $(CROSS_COMPILE)gcc + CXX := $(CROSS_COMPILE)g++ + AR := $(CROSS_COMPILE)ar + AS := $(CROSS_COMPILE)as + LD := $(CROSS_COMPILE)ld + RANLIB := $(CROSS_COMPILE)ranlib + STRIP := $(CROSS_COMPILE)strip +endif + +################################################################ +# Make command. + +MAKE = make --makefile=makefile.linux +DRV_MAKE ?= make --makefile=Kbuild + +################################################################ +# Resource. + +TOOL_DIR ?= /home/software/Linux +ANDROID_HOME ?= +KERNEL_DIR ?= $(TOOL_DIR)/kernel +X11_ARM_DIR ?= $(TOOL_DIR)/X11_ARM + +################################################################ +# Target directory. + +ifeq ($(DEBUG), 1) +OBJ_DIR ?= bin_d +else +OBJ_DIR ?= bin_r +endif + +################################################################ +# Force to use the new compiler. + +SC2X_NEW ?= 1 +ES11_NEW ?= 1 + +################################################################ +# Release directory. + +SDK_DIR ?= $(AQROOT)/build/sdk +VIVANTE_SDK_DIR ?= $(SDK_DIR) +VIVANTE_SDK_INC ?= $(VIVANTE_SDK_DIR)/include +VIVANTE_SDK_LIB ?= $(VIVANTE_SDK_DIR)/drivers + +################################################################ +# Force to use dma_coherent_* stuff. + +NO_DMA_COHERENT ?= 0 + +################################################################ +# Set this value to 1 if you are using ARM L2 cache. + +ENABLE_ARM_L2_CACHE ?= 0 + +################################################################ +# Set this value to 1 if you are using DOVE board. +CONFIG_DOVE_GPU ?= 0 + +############################################################### +# Common CFLAGS. + +ifeq ($(USE_ARMCC), 1) + CFLAGS += --c99 #--strict +else +ifeq ($(ABI), 0) +else + CFLAGS += -mabi=$(ABI) +endif + +ifneq ($(ENDIANNESS),) + CFLAGS += $(ENDIANNESS) + LFLAGS += $(ENDIANNESS) + PFLAGS += $(ENDIANNESS) +endif +endif + +ifeq ($(ANDROID), 1) + USE_VDK = 0 + + ifeq ($(ARCH_TYPE), arm) + CFLAGS += -I$(ANDROID_HOME)/bionic/libstdc++/include -I$(ANDROID_HOME)/bionic/libc/arch-arm/include -I$(ANDROID_HOME)/bionic/libc/include -I$(ANDROID_HOME)/bionic/libc/kernel/common/ -I$(ANDROID_HOME)/bionic/libc/kernel/arch-arm -I$(ANDROID_HOME)/bionic/libm/include -I$(ANDROID_HOME)/bionic/libm/include/arch/arm -I$(ANDROID_HOME)/bionic/libthread_db/include -I$(ANDROID_HOME)/system/core/include -I$(ANDROID_HOME)/frameworks/base/include + CFLAGS += -DANDROID -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -fno-short-enums + endif + + ifeq ($(ARCH_TYPE), xburst) + CFLAGS += -I$(ANDROID_HOME)/bionic/libstdc++/include -I$(ANDROID_HOME)/bionic/libc/arch-xburst/include -I$(ANDROID_HOME)/bionic/libc/include -I$(ANDROID_HOME)/bionic/libc/kernel/common/ -I$(ANDROID_HOME)/bionic/libc/kernel/arch-xburst -I$(ANDROID_HOME)/bionic/libm/include -I$(ANDROID_HOME)/bionic/libm/include/mips -I$(ANDROID_HOME)/bionic/libthread_db/include + endif + + ifeq ($(EGL_API_ANDROID), 1) + CFLAGS += -DEGL_API_ANDROID + endif + + ifeq ($(ANDROID_VERSION_ECLAIR), 1) + CFLAGS += -DANDROID_VERSION_ECLAIR + endif + + ifeq ($(ANDROID_VERSION_GINGERBREAD), 1) + CFLAGS += -I$(ANDROID_HOME)/frameworks/base/native/include -DANDROID_VERSION_GINGERBREAD + endif +endif + +ifeq ($(QNX), 1) + CFLAGS += -D__QNXNTO__ +else + ifneq ($(USE_ARMCC),1) + CFLAGS += -DLINUX + endif +endif + +ifeq ($(LINUX_OABI), 1) + CFLAGS += -DLINUX_OABI +endif + +ifneq ($(USE_ARMCC), 1) +CFLAGS += -Wall -D_REENTRANT -fno-strict-aliasing + +ifeq ($(CPU_TYPE), 0) +else + CFLAGS += -mcpu=$(CPU_TYPE) + AFLAGS += -mcpu=$(CPU_TYPE) +endif + +ifeq ($(CPU_ARCH), 0) +else + CFLAGS += -march=$(CPU_ARCH) + AFLAGS += -march=$(CPU_ARCH) +endif +endif + +ifeq ($(DEBUG), 1) + CFLAGS += -g -fPIC -O0 -DDEBUG -D_DEBUG +else + CFLAGS += -O2 -fPIC +endif + +ifeq ($(EGL_API_FB), 1) + CFLAGS += -DEGL_API_FB +endif + +ifeq ($(STATIC_LINK), 1) + CFLAGS += -DSTATIC_LINK +endif + +ifeq ($(USE_VDK), 1) + CFLAGS += -DUSE_VDK=1 -DUSE_SW_FB=$(USE_SW_FB) +else + CFLAGS += -DUSE_VDK=0 -DUSE_SW_FB=$(USE_SW_FB) +endif +ifeq ($(MRVL_NATIVE_IMAGE_KHR_FOR_CHROME),1) + CFLAGS += -DMRVL_NATIVE_IMAGE_KHR_FOR_CHROME=1 +else + CFLAGS += -DMRVL_NATIVE_IMAGE_KHR_FOR_CHROME=0 +endif + +ifeq ($(USE_NEW_LINUX_SIGNAL), 1) + CFLAGS += -DUSE_NEW_LINUX_SIGNAL=1 +endif + +ifneq ($(USE_ARMCC), 1) +CXXFLAGS += -fno-short-enums +endif + +ifneq (,$(EGL_APPENDIX)) +CFLAGS += -D_EGL_APPENDIX=$(EGL_APPENDIX) +endif +ifneq (,$(GL_11_APPENDIX)) +CFLAGS += -D_GL_11_APPENDIX=$(GL_11_APPENDIX) +endif +ifneq (,$(GL_2_APPENDIX)) +CFLAGS += -D_GL_2_APPENDIX=$(GL_2_APPENDIX) +endif +ifneq (,$(VG_APPENDIX)) +CFLAGS += -D_VG_APPENDIX=$(VG_APPENDIX) +endif + +CFLAGS += -DgcdREGISTER_ACCESS_FROM_USER=1 + +################################################################################ +# Build with profiler +ifeq ($(USE_PROFILER),1) + CFLAGS += -DVIVANTE_PROFILER=1 +else + CFLAGS += -DVIVANTE_PROFILER=0 +endif + +ifeq ($(USE_MRVL_PROFILER),1) + CFLAGS += -DMRVL_BENCH=1 +else + CFLAGS += -DMRVL_BENCH=0 +endif + + +################################################################ +# Module directories. + +# drivers +GAL_DIR := $(AQROOT)/hal +ifeq ($(ES11_NEW), 1) +GLES11_DIR := $(AQROOT)/driver/openGL/libGLESv11 +else +GLES11_DIR := $(AQROOT)/driver/openGL/es11/driver +endif +EGL_DIR := $(AQROOT)/driver/openGL/egl +GLES2X_DIR := $(AQROOT)/driver/openGL/libGLESv2x +ifeq ($(USE_3D_VG), 1) +VG11_DIR := $(AQROOT)/driver/openVG/vg11 +OVG11_DIR := $(AQROOT)/driver/openVG/vg11/driver +else +VG11_DIR := $(AQROOT)/driver/openGL/libOpenVG +OVG11_DIR := $(AQROOT)/driver/openGL/libOpenVG +endif +GFX_DIR := $(AQROOT)/driver/gfx + +ifeq ($(SC2X_NEW), 1) +SC2X_LIB_DIR := $(GLES2X_DIR)/compiler/libGLESv2SC/entry +else +SC2X_LIB_DIR := $(GLES2X_DIR)/slc/glslang/MachineIndependent/compiler +endif + +ifeq ($(ANDROID), 1) +GCU_DIR := $(AQROOT)/gcu/proj/android +else +GCU_DIR := $(AQROOT)/gcu/proj/linux +endif + +VIVANTE_LIB_DIR := $(AQROOT)/sdk/vivante + +# applications +EGL_TEST_DIR := $(AQROOT)/test/egl +ES11_TEST_DIR := $(AQROOT)/test/es11/Linux +ES2X_TEST_DIR := $(AQROOT)/test/es20 +ES2X_EXTERN_DIR := $(AQROOT)/test/es20/extern +ES20_TEST_DIR := $(AQROOT)/sdk/samples/es20 + +ifeq ($(USE_VDK), 0) +TUTORIAL_DIR := $(ES11_TEST_DIR) +endif +VDK_TEST_DIR := $(AQROOT)/sdk/samples/vdk +HAL_TEST_DIR := $(AQROOT)/sdk +HAL_CUSTOM_DIR := $(AQROOT)/test/hal/Linux/custom +CHIPINFO_DIR := $(AQROOT)/test/hal/common/chipinfo +VDK_DIR := $(AQROOT)/sdk/vdk + +ifeq ($(USE_VDK), 1) +CONFORM_DIR := $(AQROOT)/test/es11/conform +else +# old es11 conformce test was removed +# $(AQROOT)/driver/openGL/es11/test/conform +CONFORM_DIR := +endif + +GLBES11_DIR := $(AQROOT)/test/es11/GLBenchmark_ES1.1v2 +GLBES20_DIR := $(AQROOT)/test/es20/GLBenchmark2_RC2 +GLBESNAVI11_DIR := $(AQROOT)/test/es11/GLBenchmark_Navi_Beta2/es11 +GLBESNAVI20_DIR := $(AQROOT)/test/es11/GLBenchmark_Navi_Beta2/es20 +GTF_DIR := $(AQROOT)/test/es20/conform/GTF_ES/glsl/GTF +VGMARK_DIR := $(AQROOT)/test/vg/common/VGMark_10_src +VGMARK11_DIR := $(AQROOT)/test/vg11/VGMark11/VGMark11_addendum +VGCTS_DIR := $(AQROOT)/test/vg/ovg_1.0.1_cts_rc10 +VGCTS11_DIR := $(AQROOT)/test/vg/ovg_1.1_cts_rc10 +ifeq ($(USE_VDK), 1) +MM06_DIR := $(AQROOT)/test/es11/common/3DMarkMobile06/configuration/vdk +else +MM06_DIR := $(ES11_TEST_DIR)/3DMarkMobile06 +endif +MM07_DIR := $(ES2X_TEST_DIR)/3DMarkMobileES2_RC_src +MM07U_DIR := $(ES2X_TEST_DIR)/3DMarkMobileES2_Update +SM20_DIR := $(AQROOT)/test/es20/SimulationMark_ES_2.0 +KANZI_DIR := $(AQROOT)/test/es20/Kanzi_UI_demo/Kanzi_UI_src +AB20_DIR := $(ES2X_TEST_DIR)/Automotive +JRC_DIR := $(ES2X_TEST_DIR)/JRC +GFX_TEST_DIR := $(AQROOT)/test/gfx +ES20_GEARS_DIR := $(AQROOT)/test/es20/gles2-cm-gears +ES11_UNIT_DIR := $(AQROOT)/test/es11/common/UnitTest +ES11_EXTERN_DIR := $(AQROOT)/test/es11/extern +ES11_EXTENSION_DIR := $(AQROOT)/test/es11/Extension +ES11_GEARS_DIR := $(AQROOT)/test/es11/gles1-cm-gears +VG11_UNIT_DIR := $(AQROOT)/test/vg11/UnitTest +VG11_EXTERN_DIR := $(AQROOT)/test/vg11/extern + +# third party resources +DFB_DIR ?= $(TOOL_DIR)/dfb + +TEXTURE5_DIR := $(ES2X_TEST_DIR)/texture5 +TEXTURE7_DIR := $(ES2X_TEST_DIR)/texture7 + +ACTINIUM_DIR := $(ES2X_TEST_DIR)/actinium +VVLAUNCHER_DIR := $(ES2X_TEST_DIR)/vv_launcher + +VIDEOCUBE_DIR := $(AQROOT)/test/es11/extern/VideoCube + + + |