Commit 518e41af by Nicolas Capens

Remove the watermark logo.

Change-Id: I72439a60850add0600face13c94cc481a7083792 Reviewed-on: https://swiftshader-review.googlesource.com/5221Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent e178000e
......@@ -586,15 +586,8 @@ file(GLOB_RECURSE SWIFTSHADER_LIST
list(APPEND SWIFTSHADER_LIST
${SOURCE_DIR}/Main/Config.cpp
${SOURCE_DIR}/Main/Config.hpp
${SOURCE_DIR}/Main/crc.cpp
${SOURCE_DIR}/Main/crc.h
${SOURCE_DIR}/Main/FrameBuffer.cpp
${SOURCE_DIR}/Main/FrameBuffer.hpp
${SOURCE_DIR}/Main/Logo.cpp
${SOURCE_DIR}/Main/Register.cpp
${SOURCE_DIR}/Main/Register.hpp
${SOURCE_DIR}/Main/serialvalid.cpp
${SOURCE_DIR}/Main/serialvalid.h
${SOURCE_DIR}/Main/SwiftConfig.cpp
${SOURCE_DIR}/Main/SwiftConfig.hpp
)
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_SWIFTSHADER_INCLUDE_SOFTWARE_RENDERER_H_
#define THIRD_PARTY_SWIFTSHADER_INCLUDE_SOFTWARE_RENDERER_H_
void SetupSoftwareRenderer(base::NativeLibrary egl_library) {
typedef void (__stdcall *RegisterFunc)(char* key);
RegisterFunc reg = reinterpret_cast<RegisterFunc>(
base::GetFunctionPointerFromNativeLibrary(egl_library, "Register"));
// Secret registration key so that Swift Shader doesn't display
// watermarks.
reg("SS3GCKK6B448CF63");
}
#endif // THIRD_PARTY_SWIFTSHADER_INCLUDE_SOFTWARE_RENDERER_H_
......@@ -33,11 +33,7 @@ COMMON_SRC_FILES += \
Main/Config.cpp \
Main/FrameBuffer.cpp \
Main/FrameBufferAndroid.cpp \
Main/Logo.cpp \
Main/Register.cpp \
Main/SwiftConfig.cpp \
Main/crc.cpp \
Main/serialvalid.cpp \
Main/SwiftConfig.cpp
COMMON_SRC_FILES += \
Reactor/Nucleus.cpp \
......@@ -95,10 +91,6 @@ COMMON_CFLAGS := \
-DANDROID_PLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
-std=c++11
ifneq ($(filter gce gce% calypso, $(TARGET_DEVICE)),)
COMMON_CFLAGS += -DDISPLAY_LOGO=0
endif
ifneq (16,${PLATFORM_SDK_VERSION})
COMMON_CFLAGS += -Xclang -fuse-init-array
else
......
......@@ -387,7 +387,6 @@
<ClCompile Include="Direct3DVertexShader9.cpp" />
<ClCompile Include="Direct3DVolume9.cpp" />
<ClCompile Include="Direct3DVolumeTexture9.cpp" />
<ClCompile Include="SwiftShader.cpp" />
<ClCompile Include="Unknown.cpp" />
</ItemGroup>
<ItemGroup>
......@@ -413,8 +412,6 @@
<ClInclude Include="Direct3DVolume9.hpp" />
<ClInclude Include="Direct3DVolumeTexture9.hpp" />
<ClInclude Include="resource.h" />
<ClInclude Include="SwiftShader.h" />
<ClInclude Include="SwiftShader.hpp" />
<ClInclude Include="Unknown.hpp" />
</ItemGroup>
<ItemGroup>
......
......@@ -13,7 +13,6 @@
#include "Direct3DDevice9.hpp"
#include "Capabilities.hpp"
#include "SwiftShader.hpp"
#include "Configurator.hpp"
#include "Debug.hpp"
#include "CPUID.hpp"
......@@ -167,14 +166,6 @@ namespace D3D9
return S_OK;
}
else if(iid == IID_SwiftShaderPrivateV1)
{
SwiftShader *swiftShader = new SwiftShader(this);
*object = swiftShader;
return S_OK;
}
*object = 0;
......
......@@ -12,7 +12,6 @@
#include "Direct3D9Ex.hpp"
#include "Direct3DDevice9Ex.hpp"
#include "SwiftShader.hpp"
#include "Debug.hpp"
namespace sw
......@@ -44,14 +43,6 @@ namespace D3D9
return S_OK;
}
else if(iid == IID_SwiftShaderPrivateV1)
{
SwiftShader *swiftShader = new SwiftShader(this);
*object = swiftShader;
return S_OK;
}
*object = 0;
......@@ -236,7 +227,7 @@ namespace D3D9
if(sw::postBlendSRGB)
{
capabilities->PrimitiveMiscCaps |= D3DPMISCCAPS_POSTBLENDSRGBCONVERT; // Indicates device can perform conversion to sRGB after blending.
capabilities->PrimitiveMiscCaps |= D3DPMISCCAPS_POSTBLENDSRGBCONVERT; // Indicates device can perform conversion to sRGB after blending.
}
return result;
......@@ -277,7 +268,7 @@ namespace D3D9
return Direct3D9::GetAdapterModeCount(adapter, filter->Format); // FIXME
}
long __stdcall Direct3D9Ex::EnumAdapterModesEx(unsigned int adapter, const D3DDISPLAYMODEFILTER *filter, unsigned int index, D3DDISPLAYMODEEX *modeEx)
{
TRACE("unsigned int adapter = %d, const D3DDISPLAYMODEFILTER *filter = 0x%0.8p, unsigned int index = %d, D3DDISPLAYMODEEX *modeEx = 0x%0.8p", adapter, filter, index, modeEx);
......
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2011 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#include "SwiftShader.hpp"
#include "Direct3D9.hpp"
#include "Debug.hpp"
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <initguid.h>
DEFINE_GUID(IID_SwiftShaderPrivateV1, 0x761954E6, 0xC357, 0x426d, 0xA6, 0x90, 0x00, 0x50, 0x56, 0xC0, 0x00, 0x08);
//extern SWFILTER maximumFilterQuality;
//extern SWFILTER maximumMipmapQuality;
//extern SWPERSPECTIVE perspectiveQuality;
extern bool disableServer;
namespace D3D9
{
SwiftShader::SwiftShader(Direct3D9 *d3d9) : d3d9(d3d9)
{
InitValidationApp();
}
SwiftShader::~SwiftShader()
{
}
long SwiftShader::QueryInterface(const IID &iid, void **object)
{
TRACE("");
if(iid == IID_SwiftShaderPrivateV1 ||
iid == IID_IUnknown)
{
AddRef();
*object = this;
return S_OK;
}
*object = 0;
return NOINTERFACE(iid);
}
unsigned long SwiftShader::AddRef()
{
TRACE("");
return Unknown::AddRef();
}
unsigned long SwiftShader::Release()
{
TRACE("");
return Unknown::Release();
}
long SwiftShader::RegisterLicenseKey(char *licenseKey)
{
TRACE("");
memset(validationKey, '\0', sizeof(validationKey));
strncpy(validationKey, licenseKey, strlen(licenseKey));
return D3D_OK;
}
long SwiftShader::SetControlSetting(SWSETTINGTYPE setting, unsigned long value)
{
switch(setting)
{
case SWS_MAXIMUMFILTERQUALITY:
// maximumFilterQuality = (SWFILTER)value;
break;
case SWS_MAXIMUMMIPMAPQUALITY:
// maximumMipmapQuality = (SWFILTER)value;
break;
case SWS_PERSPECTIVEQUALITY:
// perspectiveQuality = (SWPERSPECTIVE)value;
break;
case SWS_DISABLESERVER:
disableServer = (value != FALSE);
break;
default:
ASSERT(false);
}
return D3D_OK;
}
}
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2011 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#ifndef _SWIFTSHADER_H_
#define _SWIFTSHADER_H_
#include "Register.hpp"
#include <objbase.h>
#include <stdlib.h>
#define SWIFTSHADERAPI WINAPI
/*
* Interface IID's
*/
#if defined( _WIN32 ) && !defined( _NO_COM)
/* IID_SwiftShaderPrivateV1 */
/* {761954E6-C357-11DA-A690-005056C00008} */
DEFINE_GUID(IID_SwiftShaderPrivateV1, 0x761954E6, 0xC357, 0x426d, 0xA6, 0x90, 0x00, 0x50, 0x56, 0xC0, 0x00, 0x08);
#endif
#ifdef __cplusplus
#ifndef DECLSPEC_UUID
#if _MSC_VER >= 1100
#define DECLSPEC_UUID(x) __declspec(uuid(x))
#else
#define DECLSPEC_UUID(x)
#endif
#endif
interface DECLSPEC_UUID("761954E6-C357-11DA-A690-005056C00008") IID_SwiftShaderPrivateV1;
#if defined(_COM_SMARTPTR_TYPEDEF)
_COM_SMARTPTR_TYPEDEF(ISwiftShaderPrivateV1, __uuidof(ISwiftShaderPrivateV1));
#endif
#endif
typedef interface ISwiftShaderPrivateV1 ISwiftShaderPrivateV1;
#ifdef __cplusplus
extern "C" {
#endif
/*
* SwiftShader Private interface
*/
typedef enum _SWSETTINGTYPE {
SWS_MAXIMUMFILTERQUALITY = 1, /* SWFILTER texture filtering quality */
SWS_MAXIMUMMIPMAPQUALITY = 2, /* SWFILTER mipmap filtering quality */
SWS_PERSPECTIVEQUALITY = 3, /* SWPERSPECTIVE perspective correction quality */
SWS_DISABLESERVER = 4, /* BOOL disable SwiftConfig server */
SWS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} SWSETTINGTYPE;
typedef enum _SWFILTER {
SWF_DEFAULT = 0, /* Default filter quality (build dependent) */
SWF_NONE = 1, /* No filtering (texture/mipmap) */
SWF_POINT = 2, /* Point filtering (texture/mipmap) */
SWF_AVERAGE2 = 3, /* Averaging 2 point samples (texture) */
SWF_AVERAGE4 = 4, /* Averaging 4 point samples (texture) */
SWF_POLYGON = 5, /* Per-polygon mipmapping */
SWF_LINEAR = 6, /* (Bi)linear filtering (texture/mipamp) */
SWF_MAXIMUM = 7, /* No limitation on filter quality */
SWF_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} SWFILTER;
typedef enum _SWPERSPECTIVE {
SWP_DEFAULT = 0, /* Default perspective correction quality */
SWP_NONE = 1, /* No perspective correction (affine texture mapping) */
SWP_FAST = 2, /* Fast low-precision perspective correction */
SWP_ACCURATE = 3, /* Slower high-precision perspective correction */
SWP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} SWPERSPECTIVE;
#undef INTERFACE
#define INTERFACE ISwiftShaderPrivateV1
DECLARE_INTERFACE_(ISwiftShaderPrivateV1, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** ISwiftShaderPrivateV1 methods ***/
STDMETHOD(RegisterLicenseKey)(THIS_ char* pLicenseKey) PURE;
STDMETHOD(SetControlSetting)(THIS_ SWSETTINGTYPE Setting,DWORD Value) PURE;
};
typedef struct ISwiftShaderPrivateV1 *LPSWIFTSHADERPRIVATEV1, *LPSWIFTSHADERPRIVATEV1;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define ISwiftShaderPrivateV1_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ISwiftShaderPrivateV1_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ISwiftShaderPrivateV1_Release(p) (p)->lpVtbl->Release(p)
#define ISwiftShaderPrivateV1_RegisterLicenseKey(p,a) (p)->lpVtbl->RegisterLicenseKey(p,a)
#else
#define ISwiftShaderPrivateV1_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define ISwiftShaderPrivateV1_AddRef(p) (p)->AddRef()
#define ISwiftShaderPrivateV1_Release(p) (p)->Release()
#define ISwiftShaderPrivateV1_RegisterLicenseKey(p,a) (p)->RegisterLicenseKey(a)
#endif
/****************************************************************************
* Flags for SwiftShader
****************************************************************************/
#define SWIFTSHADER_SOME_RANDOM_FLAG 0x00000001L
#ifdef __cplusplus
};
#endif
#endif /* _SWIFTSHADER_H_ */
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2011 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#ifndef D3D9_SwiftShader_hpp
#define D3D9_SwiftShader_hpp
#include "SwiftShader.h"
#include "Unknown.hpp"
namespace D3D9
{
class Direct3D9;
class SwiftShader : public ISwiftShaderPrivateV1, public Unknown
{
public:
SwiftShader(Direct3D9 *d3d9);
virtual ~SwiftShader();
// IUnknown methods
long __stdcall QueryInterface(const IID &iid, void **object);
unsigned long __stdcall AddRef();
unsigned long __stdcall Release();
// ISwiftShaderPrivateV1 methods
long __stdcall RegisterLicenseKey(char *licenseKey);
long __stdcall SetControlSetting(SWSETTINGTYPE setting, unsigned long value);
private:
// Creation parameters
Direct3D9 *const d3d9;
};
}
#endif // D3D9_SwiftShader_hpp
......@@ -14,5 +14,3 @@ EXPORTS
DebugSetMute @12
Direct3DCreate9 @13
Direct3DCreate9Ex @14
Register
\ No newline at end of file
......@@ -13,8 +13,6 @@
#include "Timer.hpp"
#include "CPUID.hpp"
#include "serialvalid.h"
#include "Register.hpp"
#include "Renderer/Surface.hpp"
#include "Reactor/Reactor.hpp"
#include "Common/Debug.hpp"
......@@ -27,22 +25,12 @@
#include <cutils/properties.h>
#endif
#ifndef DISPLAY_LOGO
#define DISPLAY_LOGO ((NDEBUG | __ANDROID__) & 1)
#endif
#define ASYNCHRONOUS_BLIT 0 // FIXME: Currently leads to rare race conditions
extern const int logoWidth;
extern const int logoHeight;
extern const unsigned int logoData[];
namespace sw
{
extern bool forceWindowed;
Surface *FrameBuffer::logo;
unsigned int *FrameBuffer::logoImage;
void *FrameBuffer::cursor;
int FrameBuffer::cursorWidth = 0;
int FrameBuffer::cursorHeight = 0;
......@@ -58,7 +46,7 @@ namespace sw
{
this->topLeftOrigin = topLeftOrigin;
locked = 0;
locked = nullptr;
this->width = width;
this->height = height;
......@@ -73,8 +61,8 @@ namespace sw
windowed = !fullscreen;
blitFunction = 0;
blitRoutine = 0;
blitFunction = nullptr;
blitRoutine = nullptr;
blitState.width = 0;
blitState.height = 0;
......@@ -83,8 +71,6 @@ namespace sw
blitState.cursorWidth = 0;
blitState.cursorHeight = 0;
logo = 0;
if(ASYNCHRONOUS_BLIT)
{
terminate = false;
......@@ -216,8 +202,6 @@ namespace sw
Routine *FrameBuffer::copyRoutine(const BlitState &state)
{
initializeLogo();
const int width = state.width;
const int height = state.height;
const int width2 = (state.width + 1) & ~1;
......@@ -226,14 +210,6 @@ namespace sw
const int sBytes = Surface::bytes(state.sourceFormat);
const int sStride = topLeftOrigin ? (sBytes * width2) : -(sBytes * width2);
#ifdef __ANDROID__
char ro_product_model[PROPERTY_VALUE_MAX] = "";
property_get("ro.product.model", ro_product_model, nullptr);
bool validKey = strstr(ro_product_model, "Android") != nullptr;
#else
bool validKey = ValidateSerialNumber(validationKey, CHECKSUM_KEY, SERIAL_PREFIX);
#endif
Function<Void(Pointer<Byte>, Pointer<Byte>)> function;
{
Pointer<Byte> dst(function.Arg<0>());
......@@ -246,18 +222,6 @@ namespace sw
Int x0 = 0;
#if DISPLAY_LOGO
If(!Bool(validKey)/* || !Bool(validApp)*/)
{
If(y > height - logoHeight)
{
x0 = logoWidth;
s += logoWidth * sBytes;
d += logoWidth * dBytes;
}
}
#endif
switch(state.destFormat)
{
case FORMAT_X8R8G8B8:
......@@ -572,39 +536,6 @@ namespace sw
}
}
#if DISPLAY_LOGO
If(!Bool(validKey)/* || !Bool(validApp)*/)
{
UInt hash = UInt(0x0B020C04) + UInt(0xC0F090E0); // Initial value
UInt imageHash = S3TC_SUPPORT ? UInt(0x0F0D0700) + UInt(0xA0C0A090) : UInt(0x0207040B) + UInt(0xD0406010);
While(hash != imageHash)
{
For(y = (height - 1), height - 1 - y < logoHeight, y--)
{
Pointer<Byte> logo = *Pointer<Pointer<Byte> >(&logoImage) + 4 * (logoHeight - height + y) * logoWidth;
Pointer<Byte> s = src + y * sStride;
Pointer<Byte> d = dst + y * dStride;
For(Int x = 0, x < logoWidth, x++)
{
hash *= 16777619;
hash ^= *Pointer<UInt>(logo);
If(y >= 0 && x < width)
{
blend(state, d, s, logo);
}
logo += 4;
s += sBytes;
d += dBytes;
}
}
}
}
#endif
Int x0 = *Pointer<Int>(&cursorX);
Int y0 = *Pointer<Int>(&cursorY);
......@@ -739,27 +670,4 @@ namespace sw
}
}
}
void FrameBuffer::initializeLogo()
{
#if DISPLAY_LOGO
if(!logo)
{
#if S3TC_SUPPORT
logo = new Surface(0, logoWidth, logoHeight, 1, FORMAT_DXT5, true, false);
void *data = logo->lockExternal(0, 0, 0, LOCK_WRITEONLY, sw::PUBLIC);
memcpy(data, logoData, logoWidth * logoHeight);
logo->unlockExternal();
#else
logo = new Surface(0, logoWidth, logoHeight, 1, FORMAT_A8R8G8B8, true, false);
void *data = logo->lockExternal(0, 0, 0, LOCK_WRITEONLY, sw::PUBLIC);
memcpy(data, logoData, logoWidth * logoHeight * 4);
logo->unlockExternal();
#endif
logoImage = (unsigned int*)logo->lockInternal(0, 0, 0, LOCK_READONLY, sw::PUBLIC);
logo->unlockInternal();
}
#endif
}
}
......@@ -77,10 +77,6 @@ namespace sw
BlitState blitState;
static void blend(const BlitState &state, const Pointer<Byte> &d, const Pointer<Byte> &s, const Pointer<Byte> &c);
static void initializeLogo();
static Surface *logo;
static unsigned int *logoImage;
static void *cursor;
static int cursorWidth;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2013 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#include "Register.hpp"
#if defined(_WIN32)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <stdlib.h>
#else
#include <unistd.h>
#include <stdio.h>
#include <libgen.h>
#include <string.h>
#endif
#define SERIAL_PREFIX "SS"
#define CHECKSUM_KEY "ShaderCore"
// The App name ***MUST*** be in lowercase!
const char registeredApp[32] = SCRAMBLE31("chrome\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", APPNAME_SCRAMBLE);
char validationKey[32]; // Serial provided by application
char validationApp[32]; // Application name
void InitValidationApp(void)
{
memset(validationApp, '\0', sizeof(validationApp));
char exePath[4096];
#if defined(_WIN32)
GetModuleFileName(NULL, exePath, sizeof(exePath));
char exeName[256];
_splitpath(exePath, 0, 0, exeName, 0);
_strlwr(exeName);
strncpy(validationApp, exeName, strlen(exeName));
#else
char linkPath[4096];
sprintf(linkPath, "/proc/%d/exe", getpid());
int bytes = readlink(linkPath, exePath, sizeof(exePath));
exePath[bytes] = '\0';
const char *exeName = basename(exePath);
strncpy(validationApp, exeName, strlen(exeName));
#endif
}
void RegisterLicenseKey(const char *licenseKey)
{
InitValidationApp();
memset(validationKey, '\0', sizeof(validationKey));
strncpy(validationKey, licenseKey, strlen(licenseKey));
}
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2013 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#ifndef Register_hpp
#define Register_hpp
#define SERIAL_PREFIX "SS"
#define CHECKSUM_KEY "ShaderCore"
#define APPNAME_SCRAMBLE "8gbdf&*bb00nnj9v#@3.-,l8gc3x.,p"
#define SCRAMBLE31(x, y) {x[0]^y[0], x[1]^y[1], x[2]^y[2], x[3]^y[3], x[4]^y[4], x[5]^y[5], x[6]^y[6], x[7]^y[7], x[8]^y[8], x[9]^y[9], x[10]^y[10], \
x[11]^y[11], x[12]^y[12], x[13]^y[13], x[14]^y[14], x[15]^y[15], x[16]^y[16], x[17]^y[17], x[18]^y[18], x[19]^y[19], x[20]^y[20], \
x[21]^y[21], x[22]^y[22], x[23]^y[23], x[24]^y[24], x[25]^y[25], x[26]^y[26], x[27]^y[27], x[28]^y[28], x[29]^y[29], x[30]^y[30], 0}
extern const char registeredApp[32];
extern char validationKey[32];
extern char validationApp[32];
void InitValidationApp();
void RegisterLicenseKey(const char *licenseKey);
#endif // Register_hpp
/**********************************************************************
*
* Filename: crc.c
*
* Description: Slow and fast implementations of the CRC standards.
*
* Notes: The parameters for each supported CRC standard are
* defined in the header file crc.h. The implementations
* here should stand up to further additions to that list.
*
*
* Copyright (c) 2000 by Michael Barr. This software is placed into
* the public domain and may be used for any purpose. However, this
* notice must not be changed or removed and no warranty is either
* expressed or implied by its publication or distribution.
**********************************************************************/
#include "crc.h"
/*
* Derive parameters from the standard-specific parameters in crc.h.
*/
#define WIDTH (8 * sizeof(crc))
#define TOPBIT (1 << (WIDTH - 1))
#if (REFLECT_DATA == TRUE)
#undef REFLECT_DATA
#define REFLECT_DATA(X) ((unsigned char) reflect((X), 8))
#else
#undef REFLECT_DATA
#define REFLECT_DATA(X) (X)
#endif
#if (REFLECT_REMAINDER == TRUE)
#undef REFLECT_REMAINDER
#define REFLECT_REMAINDER(X) ((crc) reflect((X), WIDTH))
#else
#undef REFLECT_REMAINDER
#define REFLECT_REMAINDER(X) (X)
#endif
/*********************************************************************
*
* Function: reflect()
*
* Description: Reorder the bits of a binary sequence, by reflecting
* them about the middle position.
*
* Notes: No checking is done that nBits <= 32.
*
* Returns: The reflection of the original data.
*
*********************************************************************/
static unsigned long
reflect(unsigned long data, unsigned char nBits)
{
unsigned long reflection = 0x00000000;
unsigned char bit;
/*
* Reflect the data about the center bit.
*/
for (bit = 0; bit < nBits; ++bit)
{
/*
* If the LSB bit is set, set the reflection of it.
*/
if (data & 0x01)
{
reflection |= (1 << ((nBits - 1) - bit));
}
data = (data >> 1);
}
return (reflection);
} /* reflect() */
/*********************************************************************
*
* Function: crcSlow()
*
* Description: Compute the CRC of a given message.
*
* Notes:
*
* Returns: The CRC of the message.
*
*********************************************************************/
crc
crcSlow(unsigned char const message[], size_t nBytes)
{
crc remainder = INITIAL_REMAINDER;
/*
* Perform modulo-2 division, a byte at a time.
*/
for (size_t byte = 0; byte < nBytes; ++byte)
{
/*
* Bring the next byte into the remainder.
*/
remainder ^= (REFLECT_DATA(message[byte]) << (WIDTH - 8));
/*
* Perform modulo-2 division, a bit at a time.
*/
for (unsigned char bit = 8; bit > 0; --bit)
{
/*
* Try to divide the current data bit.
*/
if (remainder & TOPBIT)
{
remainder = (remainder << 1) ^ POLYNOMIAL;
}
else
{
remainder = (remainder << 1);
}
}
}
/*
* The final remainder is the CRC result.
*/
return (REFLECT_REMAINDER(remainder) ^ FINAL_XOR_VALUE);
} /* crcSlow() */
crc crcTable[256];
/*********************************************************************
*
* Function: crcInit()
*
* Description: Populate the partial CRC lookup table.
*
* Notes: This function must be rerun any time the CRC standard
* is changed. If desired, it can be run "offline" and
* the table results stored in an embedded system's ROM.
*
* Returns: None defined.
*
*********************************************************************/
void
crcInit(void)
{
/*
* Compute the remainder of each possible dividend.
*/
for (int dividend = 0; dividend < 256; ++dividend)
{
/*
* Start with the dividend followed by zeros.
*/
crc remainder = dividend << (WIDTH - 8);
/*
* Perform modulo-2 division, a bit at a time.
*/
for (unsigned char bit = 8; bit > 0; --bit)
{
/*
* Try to divide the current data bit.
*/
if (remainder & TOPBIT)
{
remainder = (remainder << 1) ^ POLYNOMIAL;
}
else
{
remainder = (remainder << 1);
}
}
/*
* Store the result into the table.
*/
crcTable[dividend] = remainder;
}
} /* crcInit() */
/*********************************************************************
*
* Function: crcFast()
*
* Description: Compute the CRC of a given message.
*
* Notes: crcInit() must be called first.
*
* Returns: The CRC of the message.
*
*********************************************************************/
crc
crcFast(unsigned char const message[], size_t nBytes)
{
crc remainder = INITIAL_REMAINDER;
/*
* Divide the message by the polynomial, a byte at a time.
*/
for (size_t byte = 0; byte < nBytes; ++byte)
{
unsigned char data = REFLECT_DATA(message[byte]) ^ (remainder >> (WIDTH - 8));
remainder = crcTable[data] ^ (remainder << 8);
}
/*
* The final remainder is the CRC.
*/
return (REFLECT_REMAINDER(remainder) ^ FINAL_XOR_VALUE);
} /* crcFast() */
/**********************************************************************
*
* Filename: crc.h
*
* Description: A header file describing the various CRC standards.
*
* Notes:
*
*
* Copyright (c) 2000 by Michael Barr. This software is placed into
* the public domain and may be used for any purpose. However, this
* notice must not be changed or removed and no warranty is either
* expressed or implied by its publication or distribution.
**********************************************************************/
#ifndef _crc_h
#define _crc_h
#include <stddef.h>
/*
* Select the CRC standard from the list that follows.
*/
#define CRC_CCITT
#if defined(CRC_CCITT)
typedef unsigned short crc;
#define CRC_NAME "CRC-CCITT"
#define POLYNOMIAL 0x1021
#define INITIAL_REMAINDER 0xFFFF
#define FINAL_XOR_VALUE 0x0000
#define REFLECT_DATA FALSE
#define REFLECT_REMAINDER FALSE
#define CHECK_VALUE 0x29B1
#elif defined(CRC16)
typedef unsigned short crc;
#define CRC_NAME "CRC-16"
#define POLYNOMIAL 0x8005
#define INITIAL_REMAINDER 0x0000
#define FINAL_XOR_VALUE 0x0000
#define REFLECT_DATA TRUE
#define REFLECT_REMAINDER TRUE
#define CHECK_VALUE 0xBB3D
#elif defined(CRC32)
typedef unsigned long crc;
#define CRC_NAME "CRC-32"
#define POLYNOMIAL 0x04C11DB7
#define INITIAL_REMAINDER 0xFFFFFFFF
#define FINAL_XOR_VALUE 0xFFFFFFFF
#define REFLECT_DATA TRUE
#define REFLECT_REMAINDER TRUE
#define CHECK_VALUE 0xCBF43926
#else
#error "One of CRC_CCITT, CRC16, or CRC32 must be #define'd."
#endif
#ifdef __cplusplus
extern "C" {
#endif
void crcInit(void);
crc crcSlow(unsigned char const message[], size_t nBytes);
crc crcFast(unsigned char const message[], size_t nBytes);
#ifdef __cplusplus
}
#endif
#endif /* _crc_h */
#!/usr/bin/python
import sys, os, struct
name = "swiftshader"
f = open('%s.bmp' % (name))
out = sys.stdout
def read_data(fmt):
size = struct.calcsize(fmt)
data = f.read(size)
return struct.unpack(fmt, data)
(sig, fsize, res1, res2, offset) = read_data("=HLHHL")
(hsize, w, h, planes, bpp, comp, imgsize) = read_data("=LllHHLL")
out.write("/* AUTOGENERATED BY mklogo.py DO NOT EDIT! */\n\n")
out.write("/* source image: %s size: %dx%dx%d */\n" % (name,w,h,bpp))
pitch = ((w*bpp+31)/32)*4
out.write("extern const int logoWidth = %d;\n" % (w))
out.write("extern const int logoHeight = %d;\n" % (h))
f.seek(offset)
out.write("extern const unsigned int logoData[%d*%d]={\n" % (w, h))
sep = " "
for y in xrange(0,h):
data = f.read(pitch)
for x in xrange(0,w):
# assumes source=32bpp for now
pixel = map(ord, data[x*4:x*4+4])
out.write(sep + "0x%02x%02x%02x%02x" % (0xff - pixel[3], pixel[2], pixel[1], pixel[0]))
sep = ", "
sep = ",\n "
# the C compiler will pad out any missing Y data
out.write("\n};\n")
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2011 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#pragma once
#define ROOT_LENGTH 10
#define CHECKSUM_LENGTH 4
#define PREFIX_LENGTH 2
#define SERIAL_LENGTH PREFIX_LENGTH + ROOT_LENGTH + CHECKSUM_LENGTH
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2011 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#include <string.h>
#include <stdio.h>
#include "serialvalid.h"
#include "crc.h"
static void DecryptString( char* string_to_decrypt, int string_length );
bool ValidateSerialNumber( const char* inSerialNumber, const char* checksum_key, const char* prefix)
{
if (strlen(inSerialNumber) != SERIAL_LENGTH)
{
return false;
}
if (strstr(inSerialNumber, prefix) != inSerialNumber)
{
return false;
}
char working_buffer[256];
char decrypted_serial[SERIAL_LENGTH+1];
long actual_checksum = 0;
strncpy(decrypted_serial, inSerialNumber, SERIAL_LENGTH);
decrypted_serial[SERIAL_LENGTH] = '\0';
DecryptString( &(decrypted_serial[PREFIX_LENGTH]),ROOT_LENGTH + CHECKSUM_LENGTH);
char dummy_prefix[10];
long long serial_number;
sscanf( decrypted_serial, "%2s%10llx%4lx", dummy_prefix, &serial_number, &actual_checksum);
strcpy(working_buffer, checksum_key);
strcat(working_buffer, decrypted_serial);
working_buffer[strlen(checksum_key) + PREFIX_LENGTH + ROOT_LENGTH] = '\0';
crcInit();
crc calculated_checksum = crcFast((unsigned char*)working_buffer, strlen(working_buffer));
if (calculated_checksum == actual_checksum)
return true;
else
return false;
}
static void DecryptString( char* string_to_decrypt, int string_length )
{
for ( int i = 0 ; i < string_length ; i++)
{
switch (string_to_decrypt[i])
{
case 'c':
case 'C':
string_to_decrypt[i] = 'a';
break;
case 'd':
case 'D':
string_to_decrypt[i] = 'b';
break;
case 'g':
case 'G':
string_to_decrypt[i] = 'c';
break;
case 'f':
case 'F':
string_to_decrypt[i] = 'd';
break;
case 'h':
case 'H':
string_to_decrypt[i] = 'e';
break;
case 'b':
case 'B':
string_to_decrypt[i] = 'f';
break;
case '2':
string_to_decrypt[i] = '0';
break;
case '3':
string_to_decrypt[i] = '1';
break;
case '4':
string_to_decrypt[i] = '2';
break;
case '5':
string_to_decrypt[i] = '3';
break;
case '6':
string_to_decrypt[i] = '4';
break;
case '7':
string_to_decrypt[i] = '5';
break;
case '8':
string_to_decrypt[i] = '6';
break;
case '9':
string_to_decrypt[i] = '7';
break;
case 'j':
case 'J':
string_to_decrypt[i] = '8';
break;
case 'k':
case 'K':
string_to_decrypt[i] = '9';
break;
default:
break;
}
}
}
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2011 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
#pragma once
#include "serialcommon.h"
bool ValidateSerialNumber( const char* inSerialNumber,
const char* checksum_key, const char* prefix);
......@@ -24,7 +24,6 @@
#include "Query.h"
#include "common/debug.h"
#include "Common/Version.h"
#include "Main/Register.hpp"
#define _GDI32_
#include <windows.h>
......@@ -299,7 +298,7 @@ void APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
{
context->bindReadFramebuffer(framebuffer);
}
if(target == GL_DRAW_FRAMEBUFFER_EXT || target == GL_FRAMEBUFFER)
{
context->bindDrawFramebuffer(framebuffer);
......@@ -3864,7 +3863,7 @@ void APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei sampl
UNIMPLEMENTED();
}
if(width > gl::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||
if(width > gl::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||
height > gl::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||
samples > gl::IMPLEMENTATION_MAX_SAMPLES)
{
......@@ -5521,7 +5520,7 @@ void APIENTRY glAccum(GLenum op, GLfloat value)
void APIENTRY glAlphaFunc(GLenum func, GLclampf ref)
{
TRACE("(GLenum func = 0x%X, GLclampf ref = %f)", func, ref);
gl::Context *context = gl::getContext();
if(context)
......@@ -5549,7 +5548,7 @@ void APIENTRY glArrayElement(GLint i)
void APIENTRY glBegin(GLenum mode)
{
TRACE("(GLenum mode = 0x%X)", mode);
switch(mode)
{
case GL_POINTS:
......@@ -5641,7 +5640,7 @@ void APIENTRY glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alp
void APIENTRY glClearDepth(GLclampd depth)
{
TRACE("(GLclampd depth = %d)", depth);
glClearDepthf((float)depth); // FIXME
}
......@@ -5678,7 +5677,7 @@ void APIENTRY glColor3dv(const GLdouble *v)
void APIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue)
{
TRACE("(GLfloat red = %f, GLfloat green = %f, GLfloat blue = %f)", red, green, blue);
gl::Context *context = gl::getContext();
if(context)
......@@ -5772,7 +5771,7 @@ void APIENTRY glColor4dv(const GLdouble *v)
void APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
TRACE("(GLfloat red = %f, GLfloat green = %f, GLfloat blue = %f, GLfloat alpha = %f)", red, green, blue, alpha);
gl::Context *context = gl::getContext();
if(context)
......@@ -5928,7 +5927,7 @@ void APIENTRY glDepthRange(GLclampd zNear, GLclampd zFar)
void APIENTRY glDisableClientState(GLenum array)
{
TRACE("(GLenum array = 0x%X)", array);
gl::Context *context = gl::getContext();
if(context)
......@@ -5974,7 +5973,7 @@ void APIENTRY glEdgeFlagv(const GLboolean *flag)
void APIENTRY glEnableClientState(GLenum array)
{
TRACE("(GLenum array = 0x%X)", array);
gl::Context *context = gl::getContext();
if(context)
......@@ -5995,7 +5994,7 @@ void APIENTRY glEnableClientState(GLenum array)
void APIENTRY glEnd()
{
TRACE("()");
gl::Context *context = gl::getContext();
if(context)
......@@ -6012,7 +6011,7 @@ void APIENTRY glEnd()
void APIENTRY glEndList()
{
TRACE("()");
gl::Context *context = gl::getContext();
if(context)
......@@ -6340,7 +6339,7 @@ void APIENTRY glGetTexImage(GLenum target, GLint level, GLenum format, GLenum ty
memcpy(pixels, source, image->getPitch() * image->getHeight());
image->unlock();
}
else
else
{
UNIMPLEMENTED();
}
......@@ -6355,7 +6354,7 @@ void APIENTRY glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname,
void APIENTRY glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
{
TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLint *params = %p)", target, level, pname, params);
gl::Context *context = gl::getContext();
if(context)
......@@ -6498,7 +6497,7 @@ void APIENTRY glLightModelf(GLenum pname, GLfloat param)
void APIENTRY glLightModelfv(GLenum pname, const GLfloat *params)
{
TRACE("(GLenum pname = 0x%X, const GLint *params)", pname);
gl::Context *context = gl::getContext();
if(context)
......@@ -6541,7 +6540,7 @@ void APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
void APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
{
TRACE("(GLenum light = 0x%X, GLenum pname = 0x%X, const GLint *params)", light, pname);
gl::Context *context = gl::getContext();
if(context)
......@@ -6844,7 +6843,7 @@ void APIENTRY glNormal3dv(const GLdouble *v)
void APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
{
TRACE("(GLfloat nx = %f, GLfloat ny = %f, GLfloat nz = %f)", nx, ny, nz);
gl::Context *context = gl::getContext();
if(context)
......@@ -6976,7 +6975,7 @@ void APIENTRY glPopClientAttrib(void)
void APIENTRY glPopMatrix(void)
{
TRACE("()");
gl::Context *context = gl::getContext();
if(context)
......@@ -7013,7 +7012,7 @@ void APIENTRY glPushClientAttrib(GLbitfield mask)
void APIENTRY glPushMatrix(void)
{
TRACE("()");
gl::Context *context = gl::getContext();
if(context)
......@@ -7211,7 +7210,7 @@ void APIENTRY glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
{
TRACE("(*)");
gl::Context *context = gl::getContext();
if(context)
......@@ -7233,7 +7232,7 @@ void APIENTRY glScaled(GLdouble x, GLdouble y, GLdouble z)
void APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z)
{
TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
gl::Context *context = gl::getContext();
if(context)
......@@ -7255,7 +7254,7 @@ void APIENTRY glSelectBuffer(GLsizei size, GLuint *buffer)
void APIENTRY glShadeModel(GLenum mode)
{
TRACE("(*)");
gl::Context *context = gl::getContext();
if(context)
......@@ -7322,7 +7321,7 @@ void APIENTRY glTexCoord2dv(const GLdouble *v)
void APIENTRY glTexCoord2f(GLfloat s, GLfloat t)
{
TRACE("(GLfloat s = %f, GLfloat t = %f)", s, t);
gl::Context *context = gl::getContext();
if(context)
......@@ -7520,7 +7519,7 @@ void APIENTRY glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei
void APIENTRY glTranslated(GLdouble x, GLdouble y, GLdouble z)
{
TRACE("(*)");
gl::Context *context = gl::getContext();
if(context)
......@@ -7537,7 +7536,7 @@ void APIENTRY glTranslated(GLdouble x, GLdouble y, GLdouble z)
void APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
{
TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
gl::Context *context = gl::getContext();
if(context)
......@@ -7604,7 +7603,7 @@ void APIENTRY glVertex3dv(const GLdouble *v)
void APIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
{
TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
gl::Context *context = gl::getContext();
if(context)
......@@ -7698,7 +7697,7 @@ void APIENTRY glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLi
void APIENTRY glClientActiveTexture(GLenum texture)
{
TRACE("(GLenum texture = 0x%X)", texture);
switch(texture)
{
case GL_TEXTURE0:
......@@ -7728,7 +7727,7 @@ void APIENTRY glMultiTexCoord1d(GLenum target, GLdouble s) {UNIMPLEMENTED();}
void APIENTRY glMultiTexCoord2f(GLenum texture, GLfloat s, GLfloat t)
{
TRACE("(GLenum texture = 0x%X, GLfloat s = %f, GLfloat t = %f)", texture, s, t);
gl::Context *context = gl::getContext();
if(context)
......@@ -7814,7 +7813,7 @@ BOOL WINAPI wglSwapIntervalEXT(int interval)
drawSurface->setSwapInterval(interval);
return TRUE;
}
SetLastError(ERROR_DC_NOT_FOUND);
return FALSE;
}
......@@ -7963,7 +7962,7 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc)
static const Extension glExtensions[] =
{
#define EXT(function) {#function, (PROC)function}
// Core 2.1
EXT(glDrawRangeElements),
EXT(glTexImage3D),
......@@ -8115,7 +8114,7 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc)
EXT(glFinishFenceNV),
EXT(glIsFenceNV),
EXT(glGetFenceivNV),
EXT(glIsRenderbuffer),
EXT(glBindRenderbuffer),
EXT(glDeleteRenderbuffers),
......@@ -8236,9 +8235,9 @@ BOOL WINAPI wglShareLists(HGLRC, HGLRC)
BOOL WINAPI wglSwapBuffers(HDC hdc)
{
TRACE("(*)");
gl::Display *display = gl::getDisplay();
if(display)
{
display->getPrimarySurface()->swap();
......@@ -8284,9 +8283,4 @@ BOOL WINAPI wglUseFontOutlinesW(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPG
return FALSE;
}
void APIENTRY Register(const char *licenseKey)
{
RegisterLicenseKey(licenseKey);
}
}
......@@ -212,8 +212,6 @@ global:
libGLES_CM_swiftshader;
Register;
local:
*;
};
......
......@@ -171,18 +171,10 @@
<Unit filename="../../Main/FrameBuffer.hpp" />
<Unit filename="../../Main/FrameBufferX11.cpp" />
<Unit filename="../../Main/FrameBufferX11.hpp" />
<Unit filename="../../Main/Logo.cpp" />
<Unit filename="../../Main/Register.cpp" />
<Unit filename="../../Main/Register.hpp" />
<Unit filename="../../Main/SwiftConfig.cpp" />
<Unit filename="../../Main/SwiftConfig.hpp" />
<Unit filename="../../Main/crc.cpp" />
<Unit filename="../../Main/crc.h" />
<Unit filename="../../Main/libX11.cpp" />
<Unit filename="../../Main/libX11.hpp" />
<Unit filename="../../Main/serialcommon.h" />
<Unit filename="../../Main/serialvalid.cpp" />
<Unit filename="../../Main/serialvalid.h" />
<Unit filename="../../Reactor/Nucleus.cpp" />
<Unit filename="../../Reactor/Nucleus.hpp" />
<Unit filename="../../Reactor/Reactor.hpp" />
......
......@@ -210,5 +210,3 @@ EXPORTS
eglGetSyncAttribKHR
libGLES_CM_swiftshader
Register
......@@ -19,7 +19,6 @@
#include "Common/Thread.hpp"
#include "Common/SharedLibrary.hpp"
#include "common/debug.h"
#include "Main/Register.hpp"
#include <GLES/glext.h>
......@@ -1410,10 +1409,6 @@ GL_API void GL_APIENTRY glDrawTexfvOES(const GLfloat *coords)
return es1::DrawTexfvOES(coords);
}
void GL_APIENTRY Register(const char *licenseKey)
{
RegisterLicenseKey(licenseKey);
}
}
LibGLES_CMexports::LibGLES_CMexports()
......
......@@ -292,8 +292,6 @@ global:
libGLESv2_swiftshader;
Register;
local:
*;
};
......
......@@ -170,18 +170,10 @@
<Unit filename="../../Main/FrameBuffer.hpp" />
<Unit filename="../../Main/FrameBufferX11.cpp" />
<Unit filename="../../Main/FrameBufferX11.hpp" />
<Unit filename="../../Main/Logo.cpp" />
<Unit filename="../../Main/Register.cpp" />
<Unit filename="../../Main/Register.hpp" />
<Unit filename="../../Main/SwiftConfig.cpp" />
<Unit filename="../../Main/SwiftConfig.hpp" />
<Unit filename="../../Main/crc.cpp" />
<Unit filename="../../Main/crc.h" />
<Unit filename="../../Main/libX11.cpp" />
<Unit filename="../../Main/libX11.hpp" />
<Unit filename="../../Main/serialcommon.h" />
<Unit filename="../../Main/serialvalid.cpp" />
<Unit filename="../../Main/serialvalid.h" />
<Unit filename="../../Reactor/Nucleus.cpp" />
<Unit filename="../../Reactor/Nucleus.hpp" />
<Unit filename="../../Reactor/Reactor.hpp" />
......
......@@ -291,5 +291,3 @@ EXPORTS
glGetInternalformativ @308
libGLESv2_swiftshader
Register
\ No newline at end of file
......@@ -20,7 +20,6 @@
#include "Common/Thread.hpp"
#include "Common/SharedLibrary.hpp"
#include "common/debug.h"
#include "Main/Register.hpp"
#if !defined(_MSC_VER)
#define CONSTRUCTOR __attribute__((constructor))
......@@ -1323,11 +1322,6 @@ GL_APICALL void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum *bufs)
{
return es2::DrawBuffersEXT(n, bufs);
}
void GL_APIENTRY Register(const char *licenseKey)
{
RegisterLicenseKey(licenseKey);
}
}
egl::Context *es2CreateContext(const egl::Config *config, const egl::Context *shareContext, int clientVersion);
......
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
......@@ -118,7 +118,7 @@
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<OmitFramePointers>false</OmitFramePointers>
<AdditionalIncludeDirectories>..\;..\Main;..\Renderer;..\Shader;..\Common;..\SwiftAsm;..\libjpeg;..\SwiftShader;..\D3D9;..\Reactor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DISPLAY_LOGO=0;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>
</ExceptionHandling>
......@@ -153,7 +153,7 @@
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<OmitFramePointers>false</OmitFramePointers>
<AdditionalIncludeDirectories>..\;..\Main;..\Renderer;..\Shader;..\Common;..\SwiftAsm;..\libjpeg;..\SwiftShader;..\D3D9;..\Reactor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DISPLAY_LOGO=0;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>
</ExceptionHandling>
......@@ -186,7 +186,7 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\;..\Main;..\Renderer;..\Shader;..\Common;..\SwiftAsm;..\libjpeg;..\SwiftShader;..\D3D9;..\Reactor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DISPLAY_LOGO=1;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
......@@ -219,7 +219,7 @@
<OmitFramePointers>false</OmitFramePointers>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\;..\Main;..\Renderer;..\Shader;..\Common;..\SwiftAsm;..\libjpeg;..\SwiftShader;..\D3D9;..\Reactor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DISPLAY_LOGO=0;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
......@@ -254,7 +254,7 @@
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\;..\Main;..\Renderer;..\Shader;..\Common;..\SwiftAsm;..\libjpeg;..\SwiftShader;..\D3D9;..\Reactor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DISPLAY_LOGO=1;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
......@@ -290,7 +290,7 @@
<OmitFramePointers>false</OmitFramePointers>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\;..\Main;..\Renderer;..\Shader;..\Common;..\SwiftAsm;..\libjpeg;..\SwiftShader;..\D3D9;..\Reactor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DISPLAY_LOGO=0;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
......@@ -317,9 +317,7 @@
<ClCompile Include="..\Common\Socket.cpp" />
<ClCompile Include="..\Common\Thread.cpp" />
<ClCompile Include="..\Main\Config.cpp" />
<ClCompile Include="..\Main\crc.cpp" />
<ClCompile Include="..\Main\FrameBufferWin.cpp" />
<ClCompile Include="..\Main\Register.cpp" />
<ClCompile Include="..\Renderer\ETC_Decoder.cpp" />
<ClCompile Include="..\Shader\Constants.cpp" />
<ClCompile Include="..\Shader\PixelPipeline.cpp" />
......@@ -372,8 +370,6 @@
<ClCompile Include="..\Main\FrameBuffer.cpp" />
<ClCompile Include="..\Main\FrameBufferDD.cpp" />
<ClCompile Include="..\Main\FrameBufferGDI.cpp" />
<ClCompile Include="..\Main\Logo.cpp" />
<ClCompile Include="..\Main\serialvalid.cpp" />
<ClCompile Include="..\Main\SwiftConfig.cpp" />
<ClCompile Include="..\Common\Configurator.cpp" />
<ClCompile Include="..\Common\CPUID.cpp" />
......@@ -390,7 +386,6 @@
<ClInclude Include="..\Common\Thread.hpp" />
<ClInclude Include="..\Common\Version.h" />
<ClInclude Include="..\Main\FrameBufferWin.hpp" />
<ClInclude Include="..\Main\Register.hpp" />
<ClInclude Include="..\Renderer\ETC_Decoder.hpp" />
<ClInclude Include="..\Renderer\RoutineCache.hpp" />
<ClInclude Include="..\Shader\PixelPipeline.hpp" />
......@@ -429,12 +424,9 @@
<ClInclude Include="..\Renderer\Vertex.hpp" />
<ClInclude Include="..\Renderer\VertexProcessor.hpp" />
<ClInclude Include="..\Main\Config.hpp" />
<ClInclude Include="..\Main\crc.h" />
<ClInclude Include="..\Main\FrameBuffer.hpp" />
<ClInclude Include="..\Main\FrameBufferDD.hpp" />
<ClInclude Include="..\Main\FrameBufferGDI.hpp" />
<ClInclude Include="..\Main\serialcommon.h" />
<ClInclude Include="..\Main\serialvalid.h" />
<ClInclude Include="..\Main\SwiftConfig.hpp" />
<ClInclude Include="..\Common\Configurator.hpp" />
<ClInclude Include="..\Common\CPUID.hpp" />
......
......@@ -125,12 +125,6 @@
<ClCompile Include="..\Main\FrameBufferGDI.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
<ClCompile Include="..\Main\Logo.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
<ClCompile Include="..\Main\serialvalid.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
<ClCompile Include="..\Main\SwiftConfig.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
......@@ -164,18 +158,12 @@
<ClCompile Include="..\Main\Config.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
<ClCompile Include="..\Main\Register.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
<ClCompile Include="..\Common\Socket.cpp">
<Filter>Source Files\Common</Filter>
</ClCompile>
<ClCompile Include="..\Main\FrameBufferWin.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
<ClCompile Include="..\Main\crc.cpp">
<Filter>Source Files\Main</Filter>
</ClCompile>
<ClCompile Include="..\Shader\PixelPipeline.cpp">
<Filter>Source Files\Shader</Filter>
</ClCompile>
......@@ -289,9 +277,6 @@
<ClInclude Include="..\Main\Config.hpp">
<Filter>Header Files\Main</Filter>
</ClInclude>
<ClInclude Include="..\Main\crc.h">
<Filter>Header Files\Main</Filter>
</ClInclude>
<ClInclude Include="..\Main\FrameBuffer.hpp">
<Filter>Header Files\Main</Filter>
</ClInclude>
......@@ -301,12 +286,6 @@
<ClInclude Include="..\Main\FrameBufferGDI.hpp">
<Filter>Header Files\Main</Filter>
</ClInclude>
<ClInclude Include="..\Main\serialcommon.h">
<Filter>Header Files\Main</Filter>
</ClInclude>
<ClInclude Include="..\Main\serialvalid.h">
<Filter>Header Files\Main</Filter>
</ClInclude>
<ClInclude Include="..\Main\SwiftConfig.hpp">
<Filter>Header Files\Main</Filter>
</ClInclude>
......@@ -347,9 +326,6 @@
<Filter>Header Files\Common</Filter>
</ClInclude>
<ClInclude Include="..\Common\Version.h" />
<ClInclude Include="..\Main\Register.hpp">
<Filter>Header Files\Main</Filter>
</ClInclude>
<ClInclude Include="..\Common\Socket.hpp">
<Filter>Header Files\Common</Filter>
</ClInclude>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment