Commit 0f4cefe9 by apatrick@chromium.org

Map D3D calls and HLSL shaders back to GLES2 calls and GLSL ES shaders in PIX.

This makes debugging and profiling using PIX a lot more convenient. The top level of events are the GLES calls with their arguments. Those can be expanded to see the D3D calls that were issued for a particular GLES call. When PIX is attached, the shaders are saved out to temporary files and referenced from the translated HLSL shaders via #line directives. This enabled source level debugging of the original GLSL from PIX for pixel and vertex shaders. The HLSL is also saved to a temporary file so that intrinsic functions like texture2D can be stepped into. It also avoids creating a text file in the current working directory, which has continued to be an issue. I made the dependency on d3d9.dll static again so it can be accessed by GetModuleHandle witihin DllMain. I added an EVENT macro that issues D3DPERF_BeginEvent and D3DPERF_EndEvent around a C++ block. I replaced TRACE with EVENT for all the entry points. I removed the tracing of shader source since the source is visible in PIX. The means by which the filename of the temporary shader file is passed into the shader compiler is a little clunky. I did it that way to avoid changing the function signatures and breaking folks using the translator. I plan to make the compiler respect #pragma optimize so that optimization can be disabled for debugging purposes. For now it just disables shader optimization in debug builds of ANGLE. Review URL: http://codereview.appspot.com/3945043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@541 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent e9874058
...@@ -71,7 +71,9 @@ typedef enum { ...@@ -71,7 +71,9 @@ typedef enum {
SH_VALIDATE_LOOP_INDEXING = 0x0001, SH_VALIDATE_LOOP_INDEXING = 0x0001,
SH_INTERMEDIATE_TREE = 0x0002, SH_INTERMEDIATE_TREE = 0x0002,
SH_OBJECT_CODE = 0x0004, SH_OBJECT_CODE = 0x0004,
SH_ATTRIBUTES_UNIFORMS = 0x0008 SH_ATTRIBUTES_UNIFORMS = 0x0008,
SH_LINE_DIRECTIVES = 0x0010,
SH_SOURCE_PATH = 0x0200,
} ShCompileOptions; } ShCompileOptions;
// //
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{ {
'target_defaults': { 'target_defaults': {
'defines': [ 'defines': [
'TRACE_OUTPUT_FILE="angle-debug.txt"', 'ANGLE_DISABLE_TRACE',
], ],
}, },
'targets': [ 'targets': [
...@@ -183,7 +183,10 @@ ...@@ -183,7 +183,10 @@
'msvs_settings': { 'msvs_settings': {
'VCLinkerTool': { 'VCLinkerTool': {
'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'], 'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
'AdditionalDependencies': ['d3dx9.lib'], 'AdditionalDependencies': [
'd3d9.lib',
'd3dx9.lib',
],
} }
}, },
}, },
...@@ -215,6 +218,7 @@ ...@@ -215,6 +218,7 @@
'VCLinkerTool': { 'VCLinkerTool': {
'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'], 'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
'AdditionalDependencies': [ 'AdditionalDependencies': [
'd3d9.lib',
'dxguid.lib', 'dxguid.lib',
], ],
} }
......
// //
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// debug.cpp: Debugging utilities. // debug.cpp: Debugging utilities.
#include "common/debug.h" #include "common/debug.h"
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <d3d9.h>
#ifndef TRACE_OUTPUT_FILE #include <windows.h>
#define TRACE_OUTPUT_FILE "debug.txt"
#endif namespace gl
{
static bool trace_on = true;
typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR);
namespace gl
{ static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg)
void trace(const char *format, ...) {
{ #if !defined(ANGLE_DISABLE_PERF)
#if !defined(ANGLE_DISABLE_TRACE) if (perfActive())
if (trace_on) {
{ char message[4096];
if (format) int len = vsprintf_s(message, format, vararg);
{ if (len < 0)
FILE *file = fopen(TRACE_OUTPUT_FILE, "a"); {
return;
if (file) }
{
va_list vararg; // There are no ASCII variants of these D3DPERF functions.
va_start(vararg, format); wchar_t wideMessage[4096];
vfprintf(file, format, vararg); for (int i = 0; i < len; ++i)
va_end(vararg); {
wideMessage[i] = message[i];
fclose(file); }
} wideMessage[len] = 0;
}
} perfFunc(0, wideMessage);
#endif // !defined(ANGLE_DISABLE_TRACE) }
} #endif
}
#if !defined(ANGLE_DISABLE_TRACE)
#if defined(NDEBUG)
if (traceFileDebugOnly)
{
return;
}
#endif
FILE* file = fopen(TRACE_OUTPUT_FILE, "a");
if (file)
{
vfprintf(file, format, vararg);
fclose(file);
}
#endif
}
void trace(bool traceFileDebugOnly, const char *format, ...)
{
va_list vararg;
va_start(vararg, format);
output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg);
va_end(vararg);
}
bool perfActive()
{
#if defined(ANGLE_DISABLE_PERF)
return false;
#else
return D3DPERF_GetStatus() != 0;
#endif
}
ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
{
va_list vararg;
va_start(vararg, format);
output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);
va_end(vararg);
}
ScopedPerfEventHelper::~ScopedPerfEventHelper()
{
#if !defined(ANGLE_DISABLE_PERF)
if (perfActive())
{
D3DPERF_EndEvent();
}
#endif
}
}
...@@ -12,49 +12,87 @@ ...@@ -12,49 +12,87 @@
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#include "common/angleutils.h"
#if !defined(TRACE_OUTPUT_FILE)
#define TRACE_OUTPUT_FILE "debug.txt"
#endif
namespace gl namespace gl
{ {
// Outputs text to the debugging log // Outputs text to the debugging log
void trace(const char *format, ...); void trace(bool traceFileDebugOnly, const char *format, ...);
// Returns whether D3DPERF is active.
bool perfActive();
// Pairs a D3D begin event with an end event.
class ScopedPerfEventHelper
{
public:
ScopedPerfEventHelper(const char* format, ...);
~ScopedPerfEventHelper();
private:
DISALLOW_COPY_AND_ASSIGN(ScopedPerfEventHelper);
};
} }
// A macro to output a trace of a function call and its arguments to the debugging log // A macro to output a trace of a function call and its arguments to the debugging log
#if !defined(NDEBUG) && !defined(ANGLE_DISABLE_TRACE) #if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
#define TRACE(message, ...) gl::trace("trace: %s"message"\n", __FUNCTION__, __VA_ARGS__) #define TRACE(message, ...) (void(0))
#else
#define TRACE(message, ...) gl::trace(true, "trace: %s(%d): "message"\n", __FUNCTION__, __LINE__, __VA_ARGS__)
#endif
// A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing.
#if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
#define FIXME(message, ...) (void(0))
#else #else
#define TRACE(...) ((void)0) #define FIXME(message, ...) gl::trace(false, "fixme: %s(%d): "message"\n", __FUNCTION__, __LINE__, __VA_ARGS__)
#endif #endif
// A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing. Will occur even in release mode. // A macro to output a function call and its arguments to the debugging log, in case of error.
#define FIXME(message, ...) gl::trace("fixme: %s"message"\n", __FUNCTION__, __VA_ARGS__) #if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
#define ERR(message, ...) (void(0))
#else
#define ERR(message, ...) gl::trace(false, "err: %s(%d): "message"\n", __FUNCTION__, __LINE__, __VA_ARGS__)
#endif
// A macro to output a function call and its arguments to the debugging log, in case of error. Will occur even in release mode. // A macro to log a performance event around a scope.
#define ERR(message, ...) gl::trace("err: %s"message"\n", __FUNCTION__, __VA_ARGS__) #if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
#define EVENT(message, ...) (void(0))
#else
#define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper ## __LINE__("%s\n" message, __FUNCTION__, __VA_ARGS__);
#endif
// A macro asserting a condition and outputting failures to the debug log // A macro asserting a condition and outputting failures to the debug log
#if !defined(NDEBUG)
#define ASSERT(expression) do { \ #define ASSERT(expression) do { \
if(!(expression)) \ if(!(expression)) \
ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \ ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \
assert(expression); \ assert(expression); \
} while(0) } while(0)
#else
#define ASSERT(expression) (void(0))
#endif
// A macro to indicate unimplemented functionality // A macro to indicate unimplemented functionality
#ifndef NDEBUG #if !defined(NDEBUG)
#define UNIMPLEMENTED() do { \ #define UNIMPLEMENTED() do { \
FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \ FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \
assert(false); \ assert(false); \
} while(0) } while(0)
#else #else
#define UNIMPLEMENTED() FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__) #define UNIMPLEMENTED() FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__)
#endif #endif
// A macro for code which is not expected to be reached under valid assumptions // A macro for code which is not expected to be reached under valid assumptions
#ifndef NDEBUG #if !defined(NDEBUG)
#define UNREACHABLE() do { \ #define UNREACHABLE() do { \
ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \ ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \
assert(false); \ assert(false); \
} while(0) } while(0)
#else #else
#define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__) #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__)
#endif #endif
......
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 540 #define BUILD_REVISION 541
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -17,7 +17,7 @@ bool InitializeSymbolTable( ...@@ -17,7 +17,7 @@ bool InitializeSymbolTable(
{ {
TIntermediate intermediate(infoSink); TIntermediate intermediate(infoSink);
TExtensionBehavior extBehavior; TExtensionBehavior extBehavior;
TParseContext parseContext(symbolTable, extBehavior, intermediate, type, spec, infoSink); TParseContext parseContext(symbolTable, extBehavior, intermediate, type, spec, 0, NULL, infoSink);
GlobalParseContext = &parseContext; GlobalParseContext = &parseContext;
...@@ -115,9 +115,19 @@ bool TCompiler::compile(const char* const shaderStrings[], ...@@ -115,9 +115,19 @@ bool TCompiler::compile(const char* const shaderStrings[],
if (shaderSpec == SH_WEBGL_SPEC) if (shaderSpec == SH_WEBGL_SPEC)
compileOptions |= SH_VALIDATE_LOOP_INDEXING; compileOptions |= SH_VALIDATE_LOOP_INDEXING;
// First string is path of source file if flag is set. The actual source follows.
const char* sourcePath = NULL;
int firstSource = 0;
if (compileOptions & SH_SOURCE_PATH)
{
sourcePath = shaderStrings[0];
++firstSource;
}
TIntermediate intermediate(infoSink); TIntermediate intermediate(infoSink);
TParseContext parseContext(symbolTable, extensionBehavior, intermediate, TParseContext parseContext(symbolTable, extensionBehavior, intermediate,
shaderType, shaderSpec, infoSink); shaderType, shaderSpec, compileOptions,
sourcePath, infoSink);
GlobalParseContext = &parseContext; GlobalParseContext = &parseContext;
// We preserve symbols at the built-in level from compile-to-compile. // We preserve symbols at the built-in level from compile-to-compile.
...@@ -128,7 +138,7 @@ bool TCompiler::compile(const char* const shaderStrings[], ...@@ -128,7 +138,7 @@ bool TCompiler::compile(const char* const shaderStrings[],
// Parse shader. // Parse shader.
bool success = bool success =
(PaParseStrings(numStrings, shaderStrings, NULL, &parseContext) == 0) && (PaParseStrings(numStrings - firstSource, &shaderStrings[firstSource], NULL, &parseContext) == 0) &&
(parseContext.treeRoot != NULL); (parseContext.treeRoot != NULL);
if (success) { if (success) {
TIntermNode* root = parseContext.treeRoot; TIntermNode* root = parseContext.treeRoot;
......
...@@ -1003,6 +1003,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -1003,6 +1003,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{ {
if (mInsideFunction) if (mInsideFunction)
{ {
outputLineDirective(node->getLine());
out << "{\n"; out << "{\n";
mScopeDepth++; mScopeDepth++;
...@@ -1019,6 +1020,8 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -1019,6 +1020,8 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
for (TIntermSequence::iterator sit = node->getSequence().begin(); sit != node->getSequence().end(); sit++) for (TIntermSequence::iterator sit = node->getSequence().begin(); sit != node->getSequence().end(); sit++)
{ {
outputLineDirective((*sit)->getLine());
if (isSingleStatement(*sit)) if (isSingleStatement(*sit))
{ {
mUnfoldSelect->traverse(*sit); mUnfoldSelect->traverse(*sit);
...@@ -1031,6 +1034,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -1031,6 +1034,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
if (mInsideFunction) if (mInsideFunction)
{ {
outputLineDirective(node->getEndLine());
out << "}\n"; out << "}\n";
mScopeDepth--; mScopeDepth--;
...@@ -1171,13 +1175,16 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -1171,13 +1175,16 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
sequence.erase(sequence.begin()); sequence.erase(sequence.begin());
out << ")\n" out << ")\n";
"{\n";
outputLineDirective(node->getLine());
out << "{\n";
mInsideFunction = true; mInsideFunction = true;
} }
else if (visit == PostVisit) else if (visit == PostVisit)
{ {
outputLineDirective(node->getEndLine());
out << "}\n"; out << "}\n";
mInsideFunction = false; mInsideFunction = false;
...@@ -1402,23 +1409,30 @@ bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node) ...@@ -1402,23 +1409,30 @@ bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node)
node->getCondition()->traverse(this); node->getCondition()->traverse(this);
out << ")\n" out << ")\n";
"{\n";
outputLineDirective(node->getLine());
out << "{\n";
if (node->getTrueBlock()) if (node->getTrueBlock())
{ {
node->getTrueBlock()->traverse(this); node->getTrueBlock()->traverse(this);
} }
outputLineDirective(node->getLine());
out << ";}\n"; out << ";}\n";
if (node->getFalseBlock()) if (node->getFalseBlock())
{ {
out << "else\n" out << "else\n";
"{\n";
outputLineDirective(node->getFalseBlock()->getLine());
out << "{\n";
outputLineDirective(node->getFalseBlock()->getLine());
node->getFalseBlock()->traverse(this); node->getFalseBlock()->traverse(this);
outputLineDirective(node->getFalseBlock()->getLine());
out << ";}\n"; out << ";}\n";
} }
} }
...@@ -1442,8 +1456,10 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node) ...@@ -1442,8 +1456,10 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
if (node->getType() == ELoopDoWhile) if (node->getType() == ELoopDoWhile)
{ {
out << "do\n" out << "do\n";
"{\n";
outputLineDirective(node->getLine());
out << "{\n";
} }
else else
{ {
...@@ -1483,8 +1499,10 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node) ...@@ -1483,8 +1499,10 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
node->getExpression()->traverse(this); node->getExpression()->traverse(this);
} }
out << ")\n" out << ")\n";
"{\n";
outputLineDirective(node->getLine());
out << "{\n";
} }
if (node->getBody()) if (node->getBody())
...@@ -1492,10 +1510,12 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node) ...@@ -1492,10 +1510,12 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
node->getBody()->traverse(this); node->getBody()->traverse(this);
} }
outputLineDirective(node->getLine());
out << "}\n"; out << "}\n";
if (node->getType() == ELoopDoWhile) if (node->getType() == ELoopDoWhile)
{ {
outputLineDirective(node->getCondition()->getLine());
out << "while(\n"; out << "while(\n";
node->getCondition()->traverse(this); node->getCondition()->traverse(this);
...@@ -1531,7 +1551,10 @@ bool OutputHLSL::visitBranch(Visit visit, TIntermBranch *node) ...@@ -1531,7 +1551,10 @@ bool OutputHLSL::visitBranch(Visit visit, TIntermBranch *node)
} }
else if (visit == PostVisit) else if (visit == PostVisit)
{ {
out << ";\n"; if (node->getExpression())
{
out << ";\n";
}
} }
break; break;
default: UNREACHABLE(); default: UNREACHABLE();
...@@ -1711,14 +1734,17 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node) ...@@ -1711,14 +1734,17 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
index->traverse(this); index->traverse(this);
out << " += "; out << " += ";
out << increment; out << increment;
out << ")\n" out << ")\n";
"{\n";
outputLineDirective(node->getLine());
out << "{\n";
if (node->getBody()) if (node->getBody())
{ {
node->getBody()->traverse(this); node->getBody()->traverse(this);
} }
outputLineDirective(node->getLine());
out << "}\n"; out << "}\n";
initial += 255 * increment; initial += 255 * increment;
...@@ -1751,6 +1777,21 @@ void OutputHLSL::outputTriplet(Visit visit, const TString &preString, const TStr ...@@ -1751,6 +1777,21 @@ void OutputHLSL::outputTriplet(Visit visit, const TString &preString, const TStr
} }
} }
void OutputHLSL::outputLineDirective(int line)
{
if ((mContext.compileOptions & SH_LINE_DIRECTIVES) && (line > 0))
{
mBody << "#line " << line;
if (mContext.sourcePath)
{
mBody << " \"" << mContext.sourcePath << "\"";
}
mBody << "\n";
}
}
TString OutputHLSL::argumentString(const TIntermSymbol *symbol) TString OutputHLSL::argumentString(const TIntermSymbol *symbol)
{ {
TQualifier qualifier = symbol->getQualifier(); TQualifier qualifier = symbol->getQualifier();
......
...@@ -49,6 +49,7 @@ class OutputHLSL : public TIntermTraverser ...@@ -49,6 +49,7 @@ class OutputHLSL : public TIntermTraverser
bool isSingleStatement(TIntermNode *node); bool isSingleStatement(TIntermNode *node);
bool handleExcessiveLoop(TIntermLoop *node); bool handleExcessiveLoop(TIntermLoop *node);
void outputTriplet(Visit visit, const TString &preString, const TString &inString, const TString &postString); void outputTriplet(Visit visit, const TString &preString, const TString &inString, const TString &postString);
void outputLineDirective(int line);
TString argumentString(const TIntermSymbol *symbol); TString argumentString(const TIntermSymbol *symbol);
int vectorSize(const TType &type) const; int vectorSize(const TType &type) const;
......
...@@ -30,8 +30,8 @@ struct TPragma { ...@@ -30,8 +30,8 @@ struct TPragma {
// they can be passed to the parser without needing a global. // they can be passed to the parser without needing a global.
// //
struct TParseContext { struct TParseContext {
TParseContext(TSymbolTable& symt, const TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, TInfoSink& is) : TParseContext(TSymbolTable& symt, const TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, int options, const char* sourcePath, TInfoSink& is) :
intermediate(interm), symbolTable(symt), extensionBehavior(ext), infoSink(is), shaderType(type), shaderSpec(spec), treeRoot(0), intermediate(interm), symbolTable(symt), extensionBehavior(ext), infoSink(is), shaderType(type), shaderSpec(spec), compileOptions(options), sourcePath(sourcePath), treeRoot(0),
recoveredFromError(false), numErrors(0), lexAfterType(false), loopNestingLevel(0), recoveredFromError(false), numErrors(0), lexAfterType(false), loopNestingLevel(0),
inTypeParen(false), scanner(NULL), contextPragma(true, false) { } inTypeParen(false), scanner(NULL), contextPragma(true, false) { }
TIntermediate& intermediate; // to hold and build a parse tree TIntermediate& intermediate; // to hold and build a parse tree
...@@ -40,6 +40,8 @@ struct TParseContext { ...@@ -40,6 +40,8 @@ struct TParseContext {
TInfoSink& infoSink; TInfoSink& infoSink;
ShShaderType shaderType; // vertex or fragment language (future: pack or unpack) ShShaderType shaderType; // vertex or fragment language (future: pack or unpack)
ShShaderSpec shaderSpec; // The language specification compiler conforms to - GLES2 or WebGL. ShShaderSpec shaderSpec; // The language specification compiler conforms to - GLES2 or WebGL.
int compileOptions;
const char* sourcePath; // Path of source file or NULL.
TIntermNode* treeRoot; // root of parse tree being created TIntermNode* treeRoot; // root of parse tree being created
bool recoveredFromError; // true if a parse error has occurred, but we continue to parse bool recoveredFromError; // true if a parse error has occurred, but we continue to parse
int numErrors; int numErrors;
......
...@@ -1770,8 +1770,10 @@ simple_statement ...@@ -1770,8 +1770,10 @@ simple_statement
compound_statement compound_statement
: LEFT_BRACE RIGHT_BRACE { $$ = 0; } : LEFT_BRACE RIGHT_BRACE { $$ = 0; }
| LEFT_BRACE { context->symbolTable.push(); } statement_list { context->symbolTable.pop(); } RIGHT_BRACE { | LEFT_BRACE { context->symbolTable.push(); } statement_list { context->symbolTable.pop(); } RIGHT_BRACE {
if ($3 != 0) if ($3 != 0) {
$3->setOp(EOpSequence); $3->setOp(EOpSequence);
$3->setEndLine($5.line);
}
$$ = $3; $$ = $3;
} }
; ;
...@@ -1787,8 +1789,10 @@ compound_statement_no_new_scope ...@@ -1787,8 +1789,10 @@ compound_statement_no_new_scope
$$ = 0; $$ = 0;
} }
| LEFT_BRACE statement_list RIGHT_BRACE { | LEFT_BRACE statement_list RIGHT_BRACE {
if ($2) if ($2) {
$2->setOp(EOpSequence); $2->setOp(EOpSequence);
$2->setEndLine($3.line);
}
$$ = $2; $$ = $2;
} }
; ;
...@@ -2061,6 +2065,9 @@ function_definition ...@@ -2061,6 +2065,9 @@ function_definition
$$->getAsAggregate()->setOptimize(context->contextPragma.optimize); $$->getAsAggregate()->setOptimize(context->contextPragma.optimize);
$$->getAsAggregate()->setDebug(context->contextPragma.debug); $$->getAsAggregate()->setDebug(context->contextPragma.debug);
$$->getAsAggregate()->addToPragmaTable(context->contextPragma.pragmaTable); $$->getAsAggregate()->addToPragmaTable(context->contextPragma.pragmaTable);
if ($3 && $3->getAsAggregate())
$$->getAsAggregate()->setEndLine($3->getAsAggregate()->getEndLine());
} }
; ;
......
...@@ -744,11 +744,11 @@ static const yytype_uint16 yyrline[] = ...@@ -744,11 +744,11 @@ static const yytype_uint16 yyrline[] =
1553, 1558, 1563, 1568, 1573, 1578, 1583, 1588, 1593, 1598, 1553, 1558, 1563, 1568, 1573, 1578, 1583, 1588, 1593, 1598,
1604, 1610, 1616, 1621, 1626, 1631, 1644, 1657, 1665, 1668, 1604, 1610, 1616, 1621, 1626, 1631, 1644, 1657, 1665, 1668,
1683, 1714, 1718, 1724, 1732, 1748, 1752, 1756, 1757, 1763, 1683, 1714, 1718, 1724, 1732, 1748, 1752, 1756, 1757, 1763,
1764, 1765, 1766, 1767, 1771, 1772, 1772, 1772, 1780, 1781, 1764, 1765, 1766, 1767, 1771, 1772, 1772, 1772, 1782, 1783,
1786, 1789, 1797, 1800, 1806, 1807, 1811, 1819, 1823, 1833, 1788, 1791, 1801, 1804, 1810, 1811, 1815, 1823, 1827, 1837,
1838, 1855, 1855, 1860, 1860, 1867, 1867, 1875, 1878, 1884, 1842, 1859, 1859, 1864, 1864, 1871, 1871, 1879, 1882, 1888,
1887, 1893, 1897, 1904, 1911, 1918, 1925, 1936, 1945, 1949, 1891, 1897, 1901, 1908, 1915, 1922, 1929, 1940, 1949, 1953,
1956, 1959, 1965, 1965 1960, 1963, 1969, 1969
}; };
#endif #endif
...@@ -4094,8 +4094,10 @@ yyreduce: ...@@ -4094,8 +4094,10 @@ yyreduce:
case 157: case 157:
{ {
if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
(yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence); (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
(yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yyvsp[(5) - (5)].lex).line);
}
(yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate); (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
;} ;}
break; break;
...@@ -4120,8 +4122,10 @@ yyreduce: ...@@ -4120,8 +4122,10 @@ yyreduce:
case 161: case 161:
{ {
if ((yyvsp[(2) - (3)].interm.intermAggregate)) if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
(yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence); (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
(yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yyvsp[(3) - (3)].lex).line);
}
(yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate); (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
;} ;}
break; break;
...@@ -4481,6 +4485,9 @@ yyreduce: ...@@ -4481,6 +4485,9 @@ yyreduce:
(yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->contextPragma.optimize); (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->contextPragma.optimize);
(yyval.interm.intermNode)->getAsAggregate()->setDebug(context->contextPragma.debug); (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->contextPragma.debug);
(yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(context->contextPragma.pragmaTable); (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(context->contextPragma.pragmaTable);
if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
(yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
;} ;}
break; break;
......
...@@ -420,7 +420,7 @@ typedef TMap<TString, TString> TPragmaTable; ...@@ -420,7 +420,7 @@ typedef TMap<TString, TString> TPragmaTable;
// //
class TIntermAggregate : public TIntermOperator { class TIntermAggregate : public TIntermOperator {
public: public:
TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { } TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0), endLine(0) { }
TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { } TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { }
~TIntermAggregate() { delete pragmaTable; } ~TIntermAggregate() { delete pragmaTable; }
...@@ -441,6 +441,8 @@ public: ...@@ -441,6 +441,8 @@ public:
bool getDebug() { return debug; } bool getDebug() { return debug; }
void addToPragmaTable(const TPragmaTable& pTable); void addToPragmaTable(const TPragmaTable& pTable);
const TPragmaTable& getPragmaTable() const { return *pragmaTable; } const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
void setEndLine(TSourceLoc line) { endLine = line; }
TSourceLoc getEndLine() const { return endLine; }
protected: protected:
TIntermAggregate(const TIntermAggregate&); // disallow copy constructor TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
...@@ -452,6 +454,7 @@ protected: ...@@ -452,6 +454,7 @@ protected:
bool optimize; bool optimize;
bool debug; bool debug;
TPragmaTable *pragmaTable; TPragmaTable *pragmaTable;
TSourceLoc endLine;
}; };
// //
......
...@@ -55,22 +55,13 @@ bool Display::initialize() ...@@ -55,22 +55,13 @@ bool Display::initialize()
return true; return true;
} }
mD3d9Module = LoadLibrary(TEXT("d3d9.dll")); mD3d9Module = GetModuleHandle(TEXT("d3d9.dll"));
if (mD3d9Module == NULL) if (mD3d9Module == NULL)
{ {
terminate(); terminate();
return false; return false;
} }
typedef IDirect3D9* (WINAPI *Direct3DCreate9Func)(UINT);
Direct3DCreate9Func Direct3DCreate9Ptr = reinterpret_cast<Direct3DCreate9Func>(GetProcAddress(mD3d9Module, "Direct3DCreate9"));
if (Direct3DCreate9Ptr == NULL)
{
terminate();
return false;
}
typedef HRESULT (WINAPI *Direct3DCreate9ExFunc)(UINT, IDirect3D9Ex**); typedef HRESULT (WINAPI *Direct3DCreate9ExFunc)(UINT, IDirect3D9Ex**);
Direct3DCreate9ExFunc Direct3DCreate9ExPtr = reinterpret_cast<Direct3DCreate9ExFunc>(GetProcAddress(mD3d9Module, "Direct3DCreate9Ex")); Direct3DCreate9ExFunc Direct3DCreate9ExPtr = reinterpret_cast<Direct3DCreate9ExFunc>(GetProcAddress(mD3d9Module, "Direct3DCreate9Ex"));
...@@ -85,7 +76,7 @@ bool Display::initialize() ...@@ -85,7 +76,7 @@ bool Display::initialize()
} }
else else
{ {
mD3d9 = Direct3DCreate9Ptr(D3D_SDK_VERSION); mD3d9 = Direct3DCreate9(D3D_SDK_VERSION);
} }
if (mD3d9) if (mD3d9)
...@@ -267,7 +258,6 @@ void Display::terminate() ...@@ -267,7 +258,6 @@ void Display::terminate()
if (mD3d9Module) if (mD3d9Module)
{ {
FreeLibrary(mD3d9Module);
mD3d9Module = NULL; mD3d9Module = NULL;
} }
} }
......
...@@ -80,7 +80,7 @@ extern "C" ...@@ -80,7 +80,7 @@ extern "C"
{ {
EGLint __stdcall eglGetError(void) EGLint __stdcall eglGetError(void)
{ {
TRACE("()"); EVENT("()");
EGLint error = egl::getCurrentError(); EGLint error = egl::getCurrentError();
...@@ -94,7 +94,7 @@ EGLint __stdcall eglGetError(void) ...@@ -94,7 +94,7 @@ EGLint __stdcall eglGetError(void)
EGLDisplay __stdcall eglGetDisplay(EGLNativeDisplayType display_id) EGLDisplay __stdcall eglGetDisplay(EGLNativeDisplayType display_id)
{ {
TRACE("(EGLNativeDisplayType display_id = 0x%0.8p)", display_id); EVENT("(EGLNativeDisplayType display_id = 0x%0.8p)", display_id);
try try
{ {
...@@ -121,7 +121,7 @@ EGLDisplay __stdcall eglGetDisplay(EGLNativeDisplayType display_id) ...@@ -121,7 +121,7 @@ EGLDisplay __stdcall eglGetDisplay(EGLNativeDisplayType display_id)
EGLBoolean __stdcall eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) EGLBoolean __stdcall eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLint *major = 0x%0.8p, EGLint *minor = 0x%0.8p)", EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint *major = 0x%0.8p, EGLint *minor = 0x%0.8p)",
dpy, major, minor); dpy, major, minor);
try try
...@@ -153,7 +153,7 @@ EGLBoolean __stdcall eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) ...@@ -153,7 +153,7 @@ EGLBoolean __stdcall eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
EGLBoolean __stdcall eglTerminate(EGLDisplay dpy) EGLBoolean __stdcall eglTerminate(EGLDisplay dpy)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p)", dpy); EVENT("(EGLDisplay dpy = 0x%0.8p)", dpy);
try try
{ {
...@@ -178,7 +178,7 @@ EGLBoolean __stdcall eglTerminate(EGLDisplay dpy) ...@@ -178,7 +178,7 @@ EGLBoolean __stdcall eglTerminate(EGLDisplay dpy)
const char *__stdcall eglQueryString(EGLDisplay dpy, EGLint name) const char *__stdcall eglQueryString(EGLDisplay dpy, EGLint name)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLint name = %d)", dpy, name); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint name = %d)", dpy, name);
try try
{ {
...@@ -213,7 +213,7 @@ const char *__stdcall eglQueryString(EGLDisplay dpy, EGLint name) ...@@ -213,7 +213,7 @@ const char *__stdcall eglQueryString(EGLDisplay dpy, EGLint name)
EGLBoolean __stdcall eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) EGLBoolean __stdcall eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLConfig *configs = 0x%0.8p, " EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig *configs = 0x%0.8p, "
"EGLint config_size = %d, EGLint *num_config = 0x%0.8p)", "EGLint config_size = %d, EGLint *num_config = 0x%0.8p)",
dpy, configs, config_size, num_config); dpy, configs, config_size, num_config);
...@@ -250,7 +250,7 @@ EGLBoolean __stdcall eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint co ...@@ -250,7 +250,7 @@ EGLBoolean __stdcall eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint co
EGLBoolean __stdcall eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config) EGLBoolean __stdcall eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p, " EVENT("(EGLDisplay dpy = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p, "
"EGLConfig *configs = 0x%0.8p, EGLint config_size = %d, EGLint *num_config = 0x%0.8p)", "EGLConfig *configs = 0x%0.8p, EGLint config_size = %d, EGLint *num_config = 0x%0.8p)",
dpy, attrib_list, configs, config_size, num_config); dpy, attrib_list, configs, config_size, num_config);
...@@ -289,7 +289,7 @@ EGLBoolean __stdcall eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, ...@@ -289,7 +289,7 @@ EGLBoolean __stdcall eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
EGLBoolean __stdcall eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) EGLBoolean __stdcall eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)", EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)",
dpy, config, attribute, value); dpy, config, attribute, value);
try try
...@@ -318,7 +318,7 @@ EGLBoolean __stdcall eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint ...@@ -318,7 +318,7 @@ EGLBoolean __stdcall eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint
EGLSurface __stdcall eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list) EGLSurface __stdcall eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLNativeWindowType win = 0x%0.8p, " EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLNativeWindowType win = 0x%0.8p, "
"const EGLint *attrib_list = 0x%0.8p)", dpy, config, win, attrib_list); "const EGLint *attrib_list = 0x%0.8p)", dpy, config, win, attrib_list);
try try
...@@ -385,7 +385,7 @@ EGLSurface __stdcall eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EG ...@@ -385,7 +385,7 @@ EGLSurface __stdcall eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EG
EGLSurface __stdcall eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) EGLSurface __stdcall eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p)", EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p)",
dpy, config, attrib_list); dpy, config, attrib_list);
try try
...@@ -411,7 +411,7 @@ EGLSurface __stdcall eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, c ...@@ -411,7 +411,7 @@ EGLSurface __stdcall eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, c
EGLSurface __stdcall eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list) EGLSurface __stdcall eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLNativePixmapType pixmap = 0x%0.8p, " EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLNativePixmapType pixmap = 0x%0.8p, "
"const EGLint *attrib_list = 0x%0.8p)", dpy, config, pixmap, attrib_list); "const EGLint *attrib_list = 0x%0.8p)", dpy, config, pixmap, attrib_list);
try try
...@@ -437,7 +437,7 @@ EGLSurface __stdcall eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EG ...@@ -437,7 +437,7 @@ EGLSurface __stdcall eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EG
EGLBoolean __stdcall eglDestroySurface(EGLDisplay dpy, EGLSurface surface) EGLBoolean __stdcall eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p)", dpy, surface); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p)", dpy, surface);
try try
{ {
...@@ -467,7 +467,7 @@ EGLBoolean __stdcall eglDestroySurface(EGLDisplay dpy, EGLSurface surface) ...@@ -467,7 +467,7 @@ EGLBoolean __stdcall eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
EGLBoolean __stdcall eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) EGLBoolean __stdcall eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)", EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)",
dpy, surface, attribute, value); dpy, surface, attribute, value);
try try
...@@ -552,7 +552,7 @@ EGLBoolean __stdcall eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint ...@@ -552,7 +552,7 @@ EGLBoolean __stdcall eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint
EGLBoolean __stdcall eglBindAPI(EGLenum api) EGLBoolean __stdcall eglBindAPI(EGLenum api)
{ {
TRACE("(EGLenum api = 0x%X)", api); EVENT("(EGLenum api = 0x%X)", api);
try try
{ {
...@@ -581,7 +581,7 @@ EGLBoolean __stdcall eglBindAPI(EGLenum api) ...@@ -581,7 +581,7 @@ EGLBoolean __stdcall eglBindAPI(EGLenum api)
EGLenum __stdcall eglQueryAPI(void) EGLenum __stdcall eglQueryAPI(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -599,7 +599,7 @@ EGLenum __stdcall eglQueryAPI(void) ...@@ -599,7 +599,7 @@ EGLenum __stdcall eglQueryAPI(void)
EGLBoolean __stdcall eglWaitClient(void) EGLBoolean __stdcall eglWaitClient(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -617,7 +617,7 @@ EGLBoolean __stdcall eglWaitClient(void) ...@@ -617,7 +617,7 @@ EGLBoolean __stdcall eglWaitClient(void)
EGLBoolean __stdcall eglReleaseThread(void) EGLBoolean __stdcall eglReleaseThread(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -635,7 +635,7 @@ EGLBoolean __stdcall eglReleaseThread(void) ...@@ -635,7 +635,7 @@ EGLBoolean __stdcall eglReleaseThread(void)
EGLSurface __stdcall eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) EGLSurface __stdcall eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLenum buftype = 0x%X, EGLClientBuffer buffer = 0x%0.8p, " EVENT("(EGLDisplay dpy = 0x%0.8p, EGLenum buftype = 0x%X, EGLClientBuffer buffer = 0x%0.8p, "
"EGLConfig config = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p)", "EGLConfig config = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p)",
dpy, buftype, buffer, config, attrib_list); dpy, buftype, buffer, config, attrib_list);
...@@ -662,7 +662,7 @@ EGLSurface __stdcall eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum bu ...@@ -662,7 +662,7 @@ EGLSurface __stdcall eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum bu
EGLBoolean __stdcall eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) EGLBoolean __stdcall eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint attribute = %d, EGLint value = %d)", EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint attribute = %d, EGLint value = %d)",
dpy, surface, attribute, value); dpy, surface, attribute, value);
try try
...@@ -688,7 +688,7 @@ EGLBoolean __stdcall eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint ...@@ -688,7 +688,7 @@ EGLBoolean __stdcall eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint
EGLBoolean __stdcall eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) EGLBoolean __stdcall eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint buffer = %d)", dpy, surface, buffer); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint buffer = %d)", dpy, surface, buffer);
try try
{ {
...@@ -713,7 +713,7 @@ EGLBoolean __stdcall eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint ...@@ -713,7 +713,7 @@ EGLBoolean __stdcall eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint
EGLBoolean __stdcall eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) EGLBoolean __stdcall eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint buffer = %d)", dpy, surface, buffer); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint buffer = %d)", dpy, surface, buffer);
try try
{ {
...@@ -738,7 +738,7 @@ EGLBoolean __stdcall eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLi ...@@ -738,7 +738,7 @@ EGLBoolean __stdcall eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLi
EGLBoolean __stdcall eglSwapInterval(EGLDisplay dpy, EGLint interval) EGLBoolean __stdcall eglSwapInterval(EGLDisplay dpy, EGLint interval)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLint interval = %d)", dpy, interval); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint interval = %d)", dpy, interval);
try try
{ {
...@@ -770,7 +770,7 @@ EGLBoolean __stdcall eglSwapInterval(EGLDisplay dpy, EGLint interval) ...@@ -770,7 +770,7 @@ EGLBoolean __stdcall eglSwapInterval(EGLDisplay dpy, EGLint interval)
EGLContext __stdcall eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list) EGLContext __stdcall eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLContext share_context = 0x%0.8p, " EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLContext share_context = 0x%0.8p, "
"const EGLint *attrib_list = 0x%0.8p)", dpy, config, share_context, attrib_list); "const EGLint *attrib_list = 0x%0.8p)", dpy, config, share_context, attrib_list);
try try
...@@ -818,7 +818,7 @@ EGLContext __stdcall eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLConte ...@@ -818,7 +818,7 @@ EGLContext __stdcall eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLConte
EGLBoolean __stdcall eglDestroyContext(EGLDisplay dpy, EGLContext ctx) EGLBoolean __stdcall eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p)", dpy, ctx); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p)", dpy, ctx);
try try
{ {
...@@ -848,7 +848,7 @@ EGLBoolean __stdcall eglDestroyContext(EGLDisplay dpy, EGLContext ctx) ...@@ -848,7 +848,7 @@ EGLBoolean __stdcall eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface draw = 0x%0.8p, EGLSurface read = 0x%0.8p, EGLContext ctx = 0x%0.8p)", EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface draw = 0x%0.8p, EGLSurface read = 0x%0.8p, EGLContext ctx = 0x%0.8p)",
dpy, draw, read, ctx); dpy, draw, read, ctx);
try try
...@@ -896,7 +896,7 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface ...@@ -896,7 +896,7 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface
EGLContext __stdcall eglGetCurrentContext(void) EGLContext __stdcall eglGetCurrentContext(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -914,7 +914,7 @@ EGLContext __stdcall eglGetCurrentContext(void) ...@@ -914,7 +914,7 @@ EGLContext __stdcall eglGetCurrentContext(void)
EGLSurface __stdcall eglGetCurrentSurface(EGLint readdraw) EGLSurface __stdcall eglGetCurrentSurface(EGLint readdraw)
{ {
TRACE("(EGLint readdraw = %d)", readdraw); EVENT("(EGLint readdraw = %d)", readdraw);
try try
{ {
...@@ -943,7 +943,7 @@ EGLSurface __stdcall eglGetCurrentSurface(EGLint readdraw) ...@@ -943,7 +943,7 @@ EGLSurface __stdcall eglGetCurrentSurface(EGLint readdraw)
EGLDisplay __stdcall eglGetCurrentDisplay(void) EGLDisplay __stdcall eglGetCurrentDisplay(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -961,7 +961,7 @@ EGLDisplay __stdcall eglGetCurrentDisplay(void) ...@@ -961,7 +961,7 @@ EGLDisplay __stdcall eglGetCurrentDisplay(void)
EGLBoolean __stdcall eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) EGLBoolean __stdcall eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)", EVENT("(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)",
dpy, ctx, attribute, value); dpy, ctx, attribute, value);
try try
...@@ -987,7 +987,7 @@ EGLBoolean __stdcall eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attr ...@@ -987,7 +987,7 @@ EGLBoolean __stdcall eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attr
EGLBoolean __stdcall eglWaitGL(void) EGLBoolean __stdcall eglWaitGL(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -1005,7 +1005,7 @@ EGLBoolean __stdcall eglWaitGL(void) ...@@ -1005,7 +1005,7 @@ EGLBoolean __stdcall eglWaitGL(void)
EGLBoolean __stdcall eglWaitNative(EGLint engine) EGLBoolean __stdcall eglWaitNative(EGLint engine)
{ {
TRACE("(EGLint engine = %d)", engine); EVENT("(EGLint engine = %d)", engine);
try try
{ {
...@@ -1023,7 +1023,7 @@ EGLBoolean __stdcall eglWaitNative(EGLint engine) ...@@ -1023,7 +1023,7 @@ EGLBoolean __stdcall eglWaitNative(EGLint engine)
EGLBoolean __stdcall eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) EGLBoolean __stdcall eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p)", dpy, surface); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p)", dpy, surface);
try try
{ {
...@@ -1056,7 +1056,7 @@ EGLBoolean __stdcall eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) ...@@ -1056,7 +1056,7 @@ EGLBoolean __stdcall eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
EGLBoolean __stdcall eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) EGLBoolean __stdcall eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
{ {
TRACE("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLNativePixmapType target = 0x%0.8p)", dpy, surface, target); EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLNativePixmapType target = 0x%0.8p)", dpy, surface, target);
try try
{ {
...@@ -1081,7 +1081,7 @@ EGLBoolean __stdcall eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativ ...@@ -1081,7 +1081,7 @@ EGLBoolean __stdcall eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativ
__eglMustCastToProperFunctionPointerType __stdcall eglGetProcAddress(const char *procname) __eglMustCastToProperFunctionPointerType __stdcall eglGetProcAddress(const char *procname)
{ {
TRACE("(const char *procname = \"%s\")", procname); EVENT("(const char *procname = \"%s\")", procname);
try try
{ {
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="dxguid.lib" AdditionalDependencies="d3d9.lib dxguid.lib"
LinkIncremental="2" LinkIncremental="2"
ModuleDefinitionFile="libEGL.def" ModuleDefinitionFile="libEGL.def"
GenerateDebugInformation="true" GenerateDebugInformation="true"
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="dxguid.lib" AdditionalDependencies="d3d9.lib dxguid.lib"
LinkIncremental="1" LinkIncremental="1"
ModuleDefinitionFile="libEGL.def" ModuleDefinitionFile="libEGL.def"
GenerateDebugInformation="true" GenerateDebugInformation="true"
......
...@@ -18,16 +18,16 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) ...@@ -18,16 +18,16 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
{ {
#ifndef NDEBUG #if !defined(ANGLE_DISABLE_TRACE)
FILE *debug = fopen("debug.txt", "rt"); FILE *debug = fopen(TRACE_OUTPUT_FILE, "rt");
if (debug) if (debug)
{ {
fclose(debug); fclose(debug);
debug = fopen("debug.txt", "wt"); // Erase debug = fopen(TRACE_OUTPUT_FILE, "wt"); // Erase
fclose(debug); fclose(debug);
} }
#endif #endif
currentTLS = TlsAlloc(); currentTLS = TlsAlloc();
......
...@@ -971,7 +971,24 @@ ID3DXBuffer *Program::compileToBinary(const char *hlsl, const char *profile, ID3 ...@@ -971,7 +971,24 @@ ID3DXBuffer *Program::compileToBinary(const char *hlsl, const char *profile, ID3
ID3DXBuffer *binary = NULL; ID3DXBuffer *binary = NULL;
ID3DXBuffer *errorMessage = NULL; ID3DXBuffer *errorMessage = NULL;
HRESULT result = D3DXCompileShader(hlsl, (UINT)strlen(hlsl), NULL, NULL, "main", profile, 0, &binary, &errorMessage, constantTable); DWORD result;
if (perfActive())
{
DWORD flags = D3DXSHADER_DEBUG;
#ifndef NDEBUG
flags |= D3DXSHADER_SKIPOPTIMIZATION;
#endif
std::string sourcePath = getTempPath();
std::string sourceText = std::string("#line 2 \"") + sourcePath + std::string("\"\n\n") + std::string(hlsl);
writeFile(sourcePath.c_str(), sourceText.c_str(), sourceText.size());
result = D3DXCompileShader(sourceText.c_str(), sourceText.size(), NULL, NULL, "main", profile, flags, &binary, &errorMessage, constantTable);
}
else
{
result = D3DXCompileShader(hlsl, (UINT)strlen(hlsl), NULL, NULL, "main", profile, 0, &binary, &errorMessage, constantTable);
}
if (SUCCEEDED(result)) if (SUCCEEDED(result))
{ {
...@@ -1461,9 +1478,6 @@ bool Program::linkVaryings() ...@@ -1461,9 +1478,6 @@ bool Program::linkVaryings()
" return output;\n" " return output;\n"
"}\n"; "}\n";
TRACE("\n%s", mPixelHLSL.c_str());
TRACE("\n%s", mVertexHLSL.c_str());
return true; return true;
} }
......
...@@ -278,12 +278,33 @@ void Shader::compileToHLSL(void *compiler) ...@@ -278,12 +278,33 @@ void Shader::compileToHLSL(void *compiler)
return; return;
} }
TRACE("\n%s", mSource);
delete[] mInfoLog; delete[] mInfoLog;
mInfoLog = NULL; mInfoLog = NULL;
int result = ShCompile(compiler, &mSource, 1, SH_OBJECT_CODE); int compileOptions = SH_OBJECT_CODE;
std::string sourcePath;
if (perfActive())
{
sourcePath = getTempPath();
writeFile(sourcePath.c_str(), mSource, strlen(mSource));
compileOptions |= SH_LINE_DIRECTIVES;
}
int result;
if (sourcePath.empty())
{
result = ShCompile(compiler, &mSource, 1, compileOptions);
}
else
{
const char* sourceStrings[2] =
{
sourcePath.c_str(),
mSource
};
result = ShCompile(compiler, sourceStrings, 2, compileOptions | SH_SOURCE_PATH);
}
if (result) if (result)
{ {
...@@ -291,8 +312,6 @@ void Shader::compileToHLSL(void *compiler) ...@@ -291,8 +312,6 @@ void Shader::compileToHLSL(void *compiler)
ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &objCodeLen); ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &objCodeLen);
mHlsl = new char[objCodeLen]; mHlsl = new char[objCodeLen];
ShGetObjectCode(compiler, mHlsl); ShGetObjectCode(compiler, mHlsl);
TRACE("\n%s", mHlsl);
} }
else else
{ {
......
...@@ -33,7 +33,7 @@ extern "C" ...@@ -33,7 +33,7 @@ extern "C"
void __stdcall glActiveTexture(GLenum texture) void __stdcall glActiveTexture(GLenum texture)
{ {
TRACE("(GLenum texture = 0x%X)", texture); EVENT("(GLenum texture = 0x%X)", texture);
try try
{ {
...@@ -57,7 +57,7 @@ void __stdcall glActiveTexture(GLenum texture) ...@@ -57,7 +57,7 @@ void __stdcall glActiveTexture(GLenum texture)
void __stdcall glAttachShader(GLuint program, GLuint shader) void __stdcall glAttachShader(GLuint program, GLuint shader)
{ {
TRACE("(GLuint program = %d, GLuint shader = %d)", program, shader); EVENT("(GLuint program = %d, GLuint shader = %d)", program, shader);
try try
{ {
...@@ -106,7 +106,7 @@ void __stdcall glAttachShader(GLuint program, GLuint shader) ...@@ -106,7 +106,7 @@ void __stdcall glAttachShader(GLuint program, GLuint shader)
void __stdcall glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) void __stdcall glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
{ {
TRACE("(GLuint program = %d, GLuint index = %d, const GLchar* name = 0x%0.8p)", program, index, name); EVENT("(GLuint program = %d, GLuint index = %d, const GLchar* name = 0x%0.8p)", program, index, name);
try try
{ {
...@@ -149,7 +149,7 @@ void __stdcall glBindAttribLocation(GLuint program, GLuint index, const GLchar* ...@@ -149,7 +149,7 @@ void __stdcall glBindAttribLocation(GLuint program, GLuint index, const GLchar*
void __stdcall glBindBuffer(GLenum target, GLuint buffer) void __stdcall glBindBuffer(GLenum target, GLuint buffer)
{ {
TRACE("(GLenum target = 0x%X, GLuint buffer = %d)", target, buffer); EVENT("(GLenum target = 0x%X, GLuint buffer = %d)", target, buffer);
try try
{ {
...@@ -178,7 +178,7 @@ void __stdcall glBindBuffer(GLenum target, GLuint buffer) ...@@ -178,7 +178,7 @@ void __stdcall glBindBuffer(GLenum target, GLuint buffer)
void __stdcall glBindFramebuffer(GLenum target, GLuint framebuffer) void __stdcall glBindFramebuffer(GLenum target, GLuint framebuffer)
{ {
TRACE("(GLenum target = 0x%X, GLuint framebuffer = %d)", target, framebuffer); EVENT("(GLenum target = 0x%X, GLuint framebuffer = %d)", target, framebuffer);
try try
{ {
...@@ -210,7 +210,7 @@ void __stdcall glBindFramebuffer(GLenum target, GLuint framebuffer) ...@@ -210,7 +210,7 @@ void __stdcall glBindFramebuffer(GLenum target, GLuint framebuffer)
void __stdcall glBindRenderbuffer(GLenum target, GLuint renderbuffer) void __stdcall glBindRenderbuffer(GLenum target, GLuint renderbuffer)
{ {
TRACE("(GLenum target = 0x%X, GLuint renderbuffer = %d)", target, renderbuffer); EVENT("(GLenum target = 0x%X, GLuint renderbuffer = %d)", target, renderbuffer);
try try
{ {
...@@ -234,7 +234,7 @@ void __stdcall glBindRenderbuffer(GLenum target, GLuint renderbuffer) ...@@ -234,7 +234,7 @@ void __stdcall glBindRenderbuffer(GLenum target, GLuint renderbuffer)
void __stdcall glBindTexture(GLenum target, GLuint texture) void __stdcall glBindTexture(GLenum target, GLuint texture)
{ {
TRACE("(GLenum target = 0x%X, GLuint texture = %d)", target, texture); EVENT("(GLenum target = 0x%X, GLuint texture = %d)", target, texture);
try try
{ {
...@@ -270,7 +270,7 @@ void __stdcall glBindTexture(GLenum target, GLuint texture) ...@@ -270,7 +270,7 @@ void __stdcall glBindTexture(GLenum target, GLuint texture)
void __stdcall glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) void __stdcall glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{ {
TRACE("(GLclampf red = %f, GLclampf green = %f, GLclampf blue = %f, GLclampf alpha = %f)", EVENT("(GLclampf red = %f, GLclampf green = %f, GLclampf blue = %f, GLclampf alpha = %f)",
red, green, blue, alpha); red, green, blue, alpha);
try try
...@@ -295,7 +295,7 @@ void __stdcall glBlendEquation(GLenum mode) ...@@ -295,7 +295,7 @@ void __stdcall glBlendEquation(GLenum mode)
void __stdcall glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) void __stdcall glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
{ {
TRACE("(GLenum modeRGB = 0x%X, GLenum modeAlpha = 0x%X)", modeRGB, modeAlpha); EVENT("(GLenum modeRGB = 0x%X, GLenum modeAlpha = 0x%X)", modeRGB, modeAlpha);
try try
{ {
...@@ -339,7 +339,7 @@ void __stdcall glBlendFunc(GLenum sfactor, GLenum dfactor) ...@@ -339,7 +339,7 @@ void __stdcall glBlendFunc(GLenum sfactor, GLenum dfactor)
void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{ {
TRACE("(GLenum srcRGB = 0x%X, GLenum dstRGB = 0x%X, GLenum srcAlpha = 0x%X, GLenum dstAlpha = 0x%X)", EVENT("(GLenum srcRGB = 0x%X, GLenum dstRGB = 0x%X, GLenum srcAlpha = 0x%X, GLenum dstAlpha = 0x%X)",
srcRGB, dstRGB, srcAlpha, dstAlpha); srcRGB, dstRGB, srcAlpha, dstAlpha);
try try
...@@ -457,7 +457,7 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha ...@@ -457,7 +457,7 @@ void __stdcall glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha
void __stdcall glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) void __stdcall glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
{ {
TRACE("(GLenum target = 0x%X, GLsizeiptr size = %d, const GLvoid* data = 0x%0.8p, GLenum usage = %d)", EVENT("(GLenum target = 0x%X, GLsizeiptr size = %d, const GLvoid* data = 0x%0.8p, GLenum usage = %d)",
target, size, data, usage); target, size, data, usage);
try try
...@@ -511,7 +511,7 @@ void __stdcall glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, ...@@ -511,7 +511,7 @@ void __stdcall glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data,
void __stdcall glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) void __stdcall glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
{ {
TRACE("(GLenum target = 0x%X, GLintptr offset = %d, GLsizeiptr size = %d, const GLvoid* data = 0x%0.8p)", EVENT("(GLenum target = 0x%X, GLintptr offset = %d, GLsizeiptr size = %d, const GLvoid* data = 0x%0.8p)",
target, offset, size, data); target, offset, size, data);
try try
...@@ -565,7 +565,7 @@ void __stdcall glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, ...@@ -565,7 +565,7 @@ void __stdcall glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
GLenum __stdcall glCheckFramebufferStatus(GLenum target) GLenum __stdcall glCheckFramebufferStatus(GLenum target)
{ {
TRACE("(GLenum target = 0x%X)", target); EVENT("(GLenum target = 0x%X)", target);
try try
{ {
...@@ -601,7 +601,7 @@ GLenum __stdcall glCheckFramebufferStatus(GLenum target) ...@@ -601,7 +601,7 @@ GLenum __stdcall glCheckFramebufferStatus(GLenum target)
void __stdcall glClear(GLbitfield mask) void __stdcall glClear(GLbitfield mask)
{ {
TRACE("(GLbitfield mask = %X)", mask); EVENT("(GLbitfield mask = %X)", mask);
try try
{ {
...@@ -620,7 +620,7 @@ void __stdcall glClear(GLbitfield mask) ...@@ -620,7 +620,7 @@ void __stdcall glClear(GLbitfield mask)
void __stdcall glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) void __stdcall glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{ {
TRACE("(GLclampf red = %f, GLclampf green = %f, GLclampf blue = %f, GLclampf alpha = %f)", EVENT("(GLclampf red = %f, GLclampf green = %f, GLclampf blue = %f, GLclampf alpha = %f)",
red, green, blue, alpha); red, green, blue, alpha);
try try
...@@ -640,7 +640,7 @@ void __stdcall glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclamp ...@@ -640,7 +640,7 @@ void __stdcall glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclamp
void __stdcall glClearDepthf(GLclampf depth) void __stdcall glClearDepthf(GLclampf depth)
{ {
TRACE("(GLclampf depth = %f)", depth); EVENT("(GLclampf depth = %f)", depth);
try try
{ {
...@@ -659,7 +659,7 @@ void __stdcall glClearDepthf(GLclampf depth) ...@@ -659,7 +659,7 @@ void __stdcall glClearDepthf(GLclampf depth)
void __stdcall glClearStencil(GLint s) void __stdcall glClearStencil(GLint s)
{ {
TRACE("(GLint s = %d)", s); EVENT("(GLint s = %d)", s);
try try
{ {
...@@ -678,7 +678,7 @@ void __stdcall glClearStencil(GLint s) ...@@ -678,7 +678,7 @@ void __stdcall glClearStencil(GLint s)
void __stdcall glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) void __stdcall glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
{ {
TRACE("(GLboolean red = %d, GLboolean green = %d, GLboolean blue = %d, GLboolean alpha = %d)", EVENT("(GLboolean red = %d, GLboolean green = %d, GLboolean blue = %d, GLboolean alpha = %d)",
red, green, blue, alpha); red, green, blue, alpha);
try try
...@@ -698,7 +698,7 @@ void __stdcall glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboo ...@@ -698,7 +698,7 @@ void __stdcall glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboo
void __stdcall glCompileShader(GLuint shader) void __stdcall glCompileShader(GLuint shader)
{ {
TRACE("(GLuint shader = %d)", shader); EVENT("(GLuint shader = %d)", shader);
try try
{ {
...@@ -732,7 +732,7 @@ void __stdcall glCompileShader(GLuint shader) ...@@ -732,7 +732,7 @@ void __stdcall glCompileShader(GLuint shader)
void __stdcall glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, void __stdcall glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
GLint border, GLsizei imageSize, const GLvoid* data) GLint border, GLsizei imageSize, const GLvoid* data)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = %d, " EVENT("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = %d, "
"GLsizei height = %d, GLint border = %d, GLsizei imageSize = %d, const GLvoid* data = 0x%0.8p)", "GLsizei height = %d, GLint border = %d, GLsizei imageSize = %d, const GLvoid* data = 0x%0.8p)",
target, level, internalformat, width, height, border, imageSize, data); target, level, internalformat, width, height, border, imageSize, data);
...@@ -856,7 +856,7 @@ void __stdcall glCompressedTexImage2D(GLenum target, GLint level, GLenum interna ...@@ -856,7 +856,7 @@ void __stdcall glCompressedTexImage2D(GLenum target, GLint level, GLenum interna
void __stdcall glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, void __stdcall glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
GLenum format, GLsizei imageSize, const GLvoid* data) GLenum format, GLsizei imageSize, const GLvoid* data)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " EVENT("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
"GLsizei width = %d, GLsizei height = %d, GLenum format = 0x%X, " "GLsizei width = %d, GLsizei height = %d, GLenum format = 0x%X, "
"GLsizei imageSize = %d, const GLvoid* data = 0x%0.8p)", "GLsizei imageSize = %d, const GLvoid* data = 0x%0.8p)",
target, level, xoffset, yoffset, width, height, format, imageSize, data); target, level, xoffset, yoffset, width, height, format, imageSize, data);
...@@ -976,7 +976,7 @@ void __stdcall glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffs ...@@ -976,7 +976,7 @@ void __stdcall glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffs
void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, " EVENT("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, "
"GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, GLint border = %d)", "GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, GLint border = %d)",
target, level, internalformat, x, y, width, height, border); target, level, internalformat, x, y, width, height, border);
...@@ -1130,7 +1130,7 @@ void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalforma ...@@ -1130,7 +1130,7 @@ void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalforma
void __stdcall glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) void __stdcall glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " EVENT("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
"GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", "GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
target, level, xoffset, yoffset, x, y, width, height); target, level, xoffset, yoffset, x, y, width, height);
...@@ -1253,7 +1253,7 @@ void __stdcall glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GL ...@@ -1253,7 +1253,7 @@ void __stdcall glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GL
GLuint __stdcall glCreateProgram(void) GLuint __stdcall glCreateProgram(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -1274,7 +1274,7 @@ GLuint __stdcall glCreateProgram(void) ...@@ -1274,7 +1274,7 @@ GLuint __stdcall glCreateProgram(void)
GLuint __stdcall glCreateShader(GLenum type) GLuint __stdcall glCreateShader(GLenum type)
{ {
TRACE("(GLenum type = 0x%X)", type); EVENT("(GLenum type = 0x%X)", type);
try try
{ {
...@@ -1302,7 +1302,7 @@ GLuint __stdcall glCreateShader(GLenum type) ...@@ -1302,7 +1302,7 @@ GLuint __stdcall glCreateShader(GLenum type)
void __stdcall glCullFace(GLenum mode) void __stdcall glCullFace(GLenum mode)
{ {
TRACE("(GLenum mode = 0x%X)", mode); EVENT("(GLenum mode = 0x%X)", mode);
try try
{ {
...@@ -1332,7 +1332,7 @@ void __stdcall glCullFace(GLenum mode) ...@@ -1332,7 +1332,7 @@ void __stdcall glCullFace(GLenum mode)
void __stdcall glDeleteBuffers(GLsizei n, const GLuint* buffers) void __stdcall glDeleteBuffers(GLsizei n, const GLuint* buffers)
{ {
TRACE("(GLsizei n = %d, const GLuint* buffers = 0x%0.8p)", n, buffers); EVENT("(GLsizei n = %d, const GLuint* buffers = 0x%0.8p)", n, buffers);
try try
{ {
...@@ -1359,7 +1359,7 @@ void __stdcall glDeleteBuffers(GLsizei n, const GLuint* buffers) ...@@ -1359,7 +1359,7 @@ void __stdcall glDeleteBuffers(GLsizei n, const GLuint* buffers)
void __stdcall glDeleteFencesNV(GLsizei n, const GLuint* fences) void __stdcall glDeleteFencesNV(GLsizei n, const GLuint* fences)
{ {
TRACE("(GLsizei n = %d, const GLuint* fences = 0x%0.8p)", n, fences); EVENT("(GLsizei n = %d, const GLuint* fences = 0x%0.8p)", n, fences);
try try
{ {
...@@ -1386,7 +1386,7 @@ void __stdcall glDeleteFencesNV(GLsizei n, const GLuint* fences) ...@@ -1386,7 +1386,7 @@ void __stdcall glDeleteFencesNV(GLsizei n, const GLuint* fences)
void __stdcall glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) void __stdcall glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
{ {
TRACE("(GLsizei n = %d, const GLuint* framebuffers = 0x%0.8p)", n, framebuffers); EVENT("(GLsizei n = %d, const GLuint* framebuffers = 0x%0.8p)", n, framebuffers);
try try
{ {
...@@ -1416,7 +1416,7 @@ void __stdcall glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) ...@@ -1416,7 +1416,7 @@ void __stdcall glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
void __stdcall glDeleteProgram(GLuint program) void __stdcall glDeleteProgram(GLuint program)
{ {
TRACE("(GLuint program = %d)", program); EVENT("(GLuint program = %d)", program);
try try
{ {
...@@ -1452,7 +1452,7 @@ void __stdcall glDeleteProgram(GLuint program) ...@@ -1452,7 +1452,7 @@ void __stdcall glDeleteProgram(GLuint program)
void __stdcall glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) void __stdcall glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
{ {
TRACE("(GLsizei n = %d, const GLuint* renderbuffers = 0x%0.8p)", n, renderbuffers); EVENT("(GLsizei n = %d, const GLuint* renderbuffers = 0x%0.8p)", n, renderbuffers);
try try
{ {
...@@ -1479,7 +1479,7 @@ void __stdcall glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) ...@@ -1479,7 +1479,7 @@ void __stdcall glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
void __stdcall glDeleteShader(GLuint shader) void __stdcall glDeleteShader(GLuint shader)
{ {
TRACE("(GLuint shader = %d)", shader); EVENT("(GLuint shader = %d)", shader);
try try
{ {
...@@ -1515,7 +1515,7 @@ void __stdcall glDeleteShader(GLuint shader) ...@@ -1515,7 +1515,7 @@ void __stdcall glDeleteShader(GLuint shader)
void __stdcall glDeleteTextures(GLsizei n, const GLuint* textures) void __stdcall glDeleteTextures(GLsizei n, const GLuint* textures)
{ {
TRACE("(GLsizei n = %d, const GLuint* textures = 0x%0.8p)", n, textures); EVENT("(GLsizei n = %d, const GLuint* textures = 0x%0.8p)", n, textures);
try try
{ {
...@@ -1545,7 +1545,7 @@ void __stdcall glDeleteTextures(GLsizei n, const GLuint* textures) ...@@ -1545,7 +1545,7 @@ void __stdcall glDeleteTextures(GLsizei n, const GLuint* textures)
void __stdcall glDepthFunc(GLenum func) void __stdcall glDepthFunc(GLenum func)
{ {
TRACE("(GLenum func = 0x%X)", func); EVENT("(GLenum func = 0x%X)", func);
try try
{ {
...@@ -1579,7 +1579,7 @@ void __stdcall glDepthFunc(GLenum func) ...@@ -1579,7 +1579,7 @@ void __stdcall glDepthFunc(GLenum func)
void __stdcall glDepthMask(GLboolean flag) void __stdcall glDepthMask(GLboolean flag)
{ {
TRACE("(GLboolean flag = %d)", flag); EVENT("(GLboolean flag = %d)", flag);
try try
{ {
...@@ -1598,7 +1598,7 @@ void __stdcall glDepthMask(GLboolean flag) ...@@ -1598,7 +1598,7 @@ void __stdcall glDepthMask(GLboolean flag)
void __stdcall glDepthRangef(GLclampf zNear, GLclampf zFar) void __stdcall glDepthRangef(GLclampf zNear, GLclampf zFar)
{ {
TRACE("(GLclampf zNear = %f, GLclampf zFar = %f)", zNear, zFar); EVENT("(GLclampf zNear = %f, GLclampf zFar = %f)", zNear, zFar);
try try
{ {
...@@ -1617,7 +1617,7 @@ void __stdcall glDepthRangef(GLclampf zNear, GLclampf zFar) ...@@ -1617,7 +1617,7 @@ void __stdcall glDepthRangef(GLclampf zNear, GLclampf zFar)
void __stdcall glDetachShader(GLuint program, GLuint shader) void __stdcall glDetachShader(GLuint program, GLuint shader)
{ {
TRACE("(GLuint program = %d, GLuint shader = %d)", program, shader); EVENT("(GLuint program = %d, GLuint shader = %d)", program, shader);
try try
{ {
...@@ -1670,7 +1670,7 @@ void __stdcall glDetachShader(GLuint program, GLuint shader) ...@@ -1670,7 +1670,7 @@ void __stdcall glDetachShader(GLuint program, GLuint shader)
void __stdcall glDisable(GLenum cap) void __stdcall glDisable(GLenum cap)
{ {
TRACE("(GLenum cap = 0x%X)", cap); EVENT("(GLenum cap = 0x%X)", cap);
try try
{ {
...@@ -1702,7 +1702,7 @@ void __stdcall glDisable(GLenum cap) ...@@ -1702,7 +1702,7 @@ void __stdcall glDisable(GLenum cap)
void __stdcall glDisableVertexAttribArray(GLuint index) void __stdcall glDisableVertexAttribArray(GLuint index)
{ {
TRACE("(GLuint index = %d)", index); EVENT("(GLuint index = %d)", index);
try try
{ {
...@@ -1726,7 +1726,7 @@ void __stdcall glDisableVertexAttribArray(GLuint index) ...@@ -1726,7 +1726,7 @@ void __stdcall glDisableVertexAttribArray(GLuint index)
void __stdcall glDrawArrays(GLenum mode, GLint first, GLsizei count) void __stdcall glDrawArrays(GLenum mode, GLint first, GLsizei count)
{ {
TRACE("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d)", mode, first, count); EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d)", mode, first, count);
try try
{ {
...@@ -1750,7 +1750,7 @@ void __stdcall glDrawArrays(GLenum mode, GLint first, GLsizei count) ...@@ -1750,7 +1750,7 @@ void __stdcall glDrawArrays(GLenum mode, GLint first, GLsizei count)
void __stdcall glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) void __stdcall glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
{ {
TRACE("(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const GLvoid* indices = 0x%0.8p)", EVENT("(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const GLvoid* indices = 0x%0.8p)",
mode, count, type, indices); mode, count, type, indices);
try try
...@@ -1790,7 +1790,7 @@ void __stdcall glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLv ...@@ -1790,7 +1790,7 @@ void __stdcall glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLv
void __stdcall glEnable(GLenum cap) void __stdcall glEnable(GLenum cap)
{ {
TRACE("(GLenum cap = 0x%X)", cap); EVENT("(GLenum cap = 0x%X)", cap);
try try
{ {
...@@ -1822,7 +1822,7 @@ void __stdcall glEnable(GLenum cap) ...@@ -1822,7 +1822,7 @@ void __stdcall glEnable(GLenum cap)
void __stdcall glEnableVertexAttribArray(GLuint index) void __stdcall glEnableVertexAttribArray(GLuint index)
{ {
TRACE("(GLuint index = %d)", index); EVENT("(GLuint index = %d)", index);
try try
{ {
...@@ -1846,7 +1846,7 @@ void __stdcall glEnableVertexAttribArray(GLuint index) ...@@ -1846,7 +1846,7 @@ void __stdcall glEnableVertexAttribArray(GLuint index)
void __stdcall glFinishFenceNV(GLuint fence) void __stdcall glFinishFenceNV(GLuint fence)
{ {
TRACE("(GLuint fence = %d)", fence); EVENT("(GLuint fence = %d)", fence);
try try
{ {
...@@ -1872,7 +1872,7 @@ void __stdcall glFinishFenceNV(GLuint fence) ...@@ -1872,7 +1872,7 @@ void __stdcall glFinishFenceNV(GLuint fence)
void __stdcall glFinish(void) void __stdcall glFinish(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -1891,7 +1891,7 @@ void __stdcall glFinish(void) ...@@ -1891,7 +1891,7 @@ void __stdcall glFinish(void)
void __stdcall glFlush(void) void __stdcall glFlush(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -1910,7 +1910,7 @@ void __stdcall glFlush(void) ...@@ -1910,7 +1910,7 @@ void __stdcall glFlush(void)
void __stdcall glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) void __stdcall glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
{ {
TRACE("(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum renderbuffertarget = 0x%X, " EVENT("(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum renderbuffertarget = 0x%X, "
"GLuint renderbuffer = %d)", target, attachment, renderbuffertarget, renderbuffer); "GLuint renderbuffer = %d)", target, attachment, renderbuffertarget, renderbuffer);
try try
...@@ -1967,7 +1967,7 @@ void __stdcall glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenu ...@@ -1967,7 +1967,7 @@ void __stdcall glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenu
void __stdcall glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) void __stdcall glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{ {
TRACE("(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum textarget = 0x%X, " EVENT("(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum textarget = 0x%X, "
"GLuint texture = %d, GLint level = %d)", target, attachment, textarget, texture, level); "GLuint texture = %d, GLint level = %d)", target, attachment, textarget, texture, level);
try try
...@@ -2074,7 +2074,7 @@ void __stdcall glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum t ...@@ -2074,7 +2074,7 @@ void __stdcall glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum t
void __stdcall glFrontFace(GLenum mode) void __stdcall glFrontFace(GLenum mode)
{ {
TRACE("(GLenum mode = 0x%X)", mode); EVENT("(GLenum mode = 0x%X)", mode);
try try
{ {
...@@ -2103,7 +2103,7 @@ void __stdcall glFrontFace(GLenum mode) ...@@ -2103,7 +2103,7 @@ void __stdcall glFrontFace(GLenum mode)
void __stdcall glGenBuffers(GLsizei n, GLuint* buffers) void __stdcall glGenBuffers(GLsizei n, GLuint* buffers)
{ {
TRACE("(GLsizei n = %d, GLuint* buffers = 0x%0.8p)", n, buffers); EVENT("(GLsizei n = %d, GLuint* buffers = 0x%0.8p)", n, buffers);
try try
{ {
...@@ -2130,7 +2130,7 @@ void __stdcall glGenBuffers(GLsizei n, GLuint* buffers) ...@@ -2130,7 +2130,7 @@ void __stdcall glGenBuffers(GLsizei n, GLuint* buffers)
void __stdcall glGenerateMipmap(GLenum target) void __stdcall glGenerateMipmap(GLenum target)
{ {
TRACE("(GLenum target = 0x%X)", target); EVENT("(GLenum target = 0x%X)", target);
try try
{ {
...@@ -2170,7 +2170,7 @@ void __stdcall glGenerateMipmap(GLenum target) ...@@ -2170,7 +2170,7 @@ void __stdcall glGenerateMipmap(GLenum target)
void __stdcall glGenFencesNV(GLsizei n, GLuint* fences) void __stdcall glGenFencesNV(GLsizei n, GLuint* fences)
{ {
TRACE("(GLsizei n = %d, GLuint* fences = 0x%0.8p)", n, fences); EVENT("(GLsizei n = %d, GLuint* fences = 0x%0.8p)", n, fences);
try try
{ {
...@@ -2197,7 +2197,7 @@ void __stdcall glGenFencesNV(GLsizei n, GLuint* fences) ...@@ -2197,7 +2197,7 @@ void __stdcall glGenFencesNV(GLsizei n, GLuint* fences)
void __stdcall glGenFramebuffers(GLsizei n, GLuint* framebuffers) void __stdcall glGenFramebuffers(GLsizei n, GLuint* framebuffers)
{ {
TRACE("(GLsizei n = %d, GLuint* framebuffers = 0x%0.8p)", n, framebuffers); EVENT("(GLsizei n = %d, GLuint* framebuffers = 0x%0.8p)", n, framebuffers);
try try
{ {
...@@ -2224,7 +2224,7 @@ void __stdcall glGenFramebuffers(GLsizei n, GLuint* framebuffers) ...@@ -2224,7 +2224,7 @@ void __stdcall glGenFramebuffers(GLsizei n, GLuint* framebuffers)
void __stdcall glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) void __stdcall glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
{ {
TRACE("(GLsizei n = %d, GLuint* renderbuffers = 0x%0.8p)", n, renderbuffers); EVENT("(GLsizei n = %d, GLuint* renderbuffers = 0x%0.8p)", n, renderbuffers);
try try
{ {
...@@ -2251,7 +2251,7 @@ void __stdcall glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) ...@@ -2251,7 +2251,7 @@ void __stdcall glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
void __stdcall glGenTextures(GLsizei n, GLuint* textures) void __stdcall glGenTextures(GLsizei n, GLuint* textures)
{ {
TRACE("(GLsizei n = %d, GLuint* textures = 0x%0.8p)", n, textures); EVENT("(GLsizei n = %d, GLuint* textures = 0x%0.8p)", n, textures);
try try
{ {
...@@ -2278,7 +2278,7 @@ void __stdcall glGenTextures(GLsizei n, GLuint* textures) ...@@ -2278,7 +2278,7 @@ void __stdcall glGenTextures(GLsizei n, GLuint* textures)
void __stdcall glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) void __stdcall glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
{ {
TRACE("(GLuint program = %d, GLuint index = %d, GLsizei bufsize = %d, GLsizei *length = 0x%0.8p, " EVENT("(GLuint program = %d, GLuint index = %d, GLsizei bufsize = %d, GLsizei *length = 0x%0.8p, "
"GLint *size = 0x%0.8p, GLenum *type = %0.8p, GLchar *name = %0.8p)", "GLint *size = 0x%0.8p, GLenum *type = %0.8p, GLchar *name = %0.8p)",
program, index, bufsize, length, size, type, name); program, index, bufsize, length, size, type, name);
...@@ -2323,7 +2323,7 @@ void __stdcall glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, ...@@ -2323,7 +2323,7 @@ void __stdcall glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize,
void __stdcall glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) void __stdcall glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
{ {
TRACE("(GLuint program = %d, GLuint index = %d, GLsizei bufsize = %d, " EVENT("(GLuint program = %d, GLuint index = %d, GLsizei bufsize = %d, "
"GLsizei* length = 0x%0.8p, GLint* size = 0x%0.8p, GLenum* type = 0x%0.8p, GLchar* name = 0x%0.8p)", "GLsizei* length = 0x%0.8p, GLint* size = 0x%0.8p, GLenum* type = 0x%0.8p, GLchar* name = 0x%0.8p)",
program, index, bufsize, length, size, type, name); program, index, bufsize, length, size, type, name);
...@@ -2368,7 +2368,7 @@ void __stdcall glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, ...@@ -2368,7 +2368,7 @@ void __stdcall glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize,
void __stdcall glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) void __stdcall glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
{ {
TRACE("(GLuint program = %d, GLsizei maxcount = %d, GLsizei* count = 0x%0.8p, GLuint* shaders = 0x%0.8p)", EVENT("(GLuint program = %d, GLsizei maxcount = %d, GLsizei* count = 0x%0.8p, GLuint* shaders = 0x%0.8p)",
program, maxcount, count, shaders); program, maxcount, count, shaders);
try try
...@@ -2407,7 +2407,7 @@ void __stdcall glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* c ...@@ -2407,7 +2407,7 @@ void __stdcall glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* c
int __stdcall glGetAttribLocation(GLuint program, const GLchar* name) int __stdcall glGetAttribLocation(GLuint program, const GLchar* name)
{ {
TRACE("(GLuint program = %d, const GLchar* name = %s)", program, name); EVENT("(GLuint program = %d, const GLchar* name = %s)", program, name);
try try
{ {
...@@ -2448,7 +2448,7 @@ int __stdcall glGetAttribLocation(GLuint program, const GLchar* name) ...@@ -2448,7 +2448,7 @@ int __stdcall glGetAttribLocation(GLuint program, const GLchar* name)
void __stdcall glGetBooleanv(GLenum pname, GLboolean* params) void __stdcall glGetBooleanv(GLenum pname, GLboolean* params)
{ {
TRACE("(GLenum pname = 0x%X, GLboolean* params = 0x%0.8p)", pname, params); EVENT("(GLenum pname = 0x%X, GLboolean* params = 0x%0.8p)", pname, params);
try try
{ {
...@@ -2511,7 +2511,7 @@ void __stdcall glGetBooleanv(GLenum pname, GLboolean* params) ...@@ -2511,7 +2511,7 @@ void __stdcall glGetBooleanv(GLenum pname, GLboolean* params)
void __stdcall glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) void __stdcall glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
{ {
TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, params); EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, params);
try try
{ {
...@@ -2558,7 +2558,7 @@ void __stdcall glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params ...@@ -2558,7 +2558,7 @@ void __stdcall glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params
GLenum __stdcall glGetError(void) GLenum __stdcall glGetError(void)
{ {
TRACE("()"); EVENT("()");
gl::Context *context = gl::getContext(); gl::Context *context = gl::getContext();
...@@ -2572,7 +2572,7 @@ GLenum __stdcall glGetError(void) ...@@ -2572,7 +2572,7 @@ GLenum __stdcall glGetError(void)
void __stdcall glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) void __stdcall glGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
{ {
TRACE("(GLuint fence = %d, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", fence, pname, params); EVENT("(GLuint fence = %d, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", fence, pname, params);
try try
{ {
...@@ -2599,7 +2599,7 @@ void __stdcall glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) ...@@ -2599,7 +2599,7 @@ void __stdcall glGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
void __stdcall glGetFloatv(GLenum pname, GLfloat* params) void __stdcall glGetFloatv(GLenum pname, GLfloat* params)
{ {
TRACE("(GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)", pname, params); EVENT("(GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)", pname, params);
try try
{ {
...@@ -2659,7 +2659,7 @@ void __stdcall glGetFloatv(GLenum pname, GLfloat* params) ...@@ -2659,7 +2659,7 @@ void __stdcall glGetFloatv(GLenum pname, GLfloat* params)
void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
{ {
TRACE("(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", EVENT("(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)",
target, attachment, pname, params); target, attachment, pname, params);
try try
...@@ -2778,7 +2778,7 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac ...@@ -2778,7 +2778,7 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
void __stdcall glGetIntegerv(GLenum pname, GLint* params) void __stdcall glGetIntegerv(GLenum pname, GLint* params)
{ {
TRACE("(GLenum pname = 0x%X, GLint* params = 0x%0.8p)", pname, params); EVENT("(GLenum pname = 0x%X, GLint* params = 0x%0.8p)", pname, params);
try try
{ {
...@@ -2843,7 +2843,7 @@ void __stdcall glGetIntegerv(GLenum pname, GLint* params) ...@@ -2843,7 +2843,7 @@ void __stdcall glGetIntegerv(GLenum pname, GLint* params)
void __stdcall glGetProgramiv(GLuint program, GLenum pname, GLint* params) void __stdcall glGetProgramiv(GLuint program, GLenum pname, GLint* params)
{ {
TRACE("(GLuint program = %d, GLenum pname = %d, GLint* params = 0x%0.8p)", program, pname, params); EVENT("(GLuint program = %d, GLenum pname = %d, GLint* params = 0x%0.8p)", program, pname, params);
try try
{ {
...@@ -2900,7 +2900,7 @@ void __stdcall glGetProgramiv(GLuint program, GLenum pname, GLint* params) ...@@ -2900,7 +2900,7 @@ void __stdcall glGetProgramiv(GLuint program, GLenum pname, GLint* params)
void __stdcall glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) void __stdcall glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
{ {
TRACE("(GLuint program = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLchar* infolog = 0x%0.8p)", EVENT("(GLuint program = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLchar* infolog = 0x%0.8p)",
program, bufsize, length, infolog); program, bufsize, length, infolog);
try try
...@@ -2932,7 +2932,7 @@ void __stdcall glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* len ...@@ -2932,7 +2932,7 @@ void __stdcall glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* len
void __stdcall glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) void __stdcall glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
{ {
TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, params); EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, params);
try try
{ {
...@@ -3048,7 +3048,7 @@ void __stdcall glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* ...@@ -3048,7 +3048,7 @@ void __stdcall glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint*
void __stdcall glGetShaderiv(GLuint shader, GLenum pname, GLint* params) void __stdcall glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
{ {
TRACE("(GLuint shader = %d, GLenum pname = %d, GLint* params = 0x%0.8p)", shader, pname, params); EVENT("(GLuint shader = %d, GLenum pname = %d, GLint* params = 0x%0.8p)", shader, pname, params);
try try
{ {
...@@ -3093,7 +3093,7 @@ void __stdcall glGetShaderiv(GLuint shader, GLenum pname, GLint* params) ...@@ -3093,7 +3093,7 @@ void __stdcall glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
void __stdcall glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) void __stdcall glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
{ {
TRACE("(GLuint shader = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLchar* infolog = 0x%0.8p)", EVENT("(GLuint shader = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLchar* infolog = 0x%0.8p)",
shader, bufsize, length, infolog); shader, bufsize, length, infolog);
try try
...@@ -3125,7 +3125,7 @@ void __stdcall glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* lengt ...@@ -3125,7 +3125,7 @@ void __stdcall glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* lengt
void __stdcall glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) void __stdcall glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
{ {
TRACE("(GLenum shadertype = 0x%X, GLenum precisiontype = 0x%X, GLint* range = 0x%0.8p, GLint* precision = 0x%0.8p)", EVENT("(GLenum shadertype = 0x%X, GLenum precisiontype = 0x%X, GLint* range = 0x%0.8p, GLint* precision = 0x%0.8p)",
shadertype, precisiontype, range, precision); shadertype, precisiontype, range, precision);
try try
...@@ -3170,7 +3170,7 @@ void __stdcall glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontyp ...@@ -3170,7 +3170,7 @@ void __stdcall glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontyp
void __stdcall glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) void __stdcall glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
{ {
TRACE("(GLuint shader = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLchar* source = 0x%0.8p)", EVENT("(GLuint shader = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLchar* source = 0x%0.8p)",
shader, bufsize, length, source); shader, bufsize, length, source);
try try
...@@ -3202,7 +3202,7 @@ void __stdcall glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length ...@@ -3202,7 +3202,7 @@ void __stdcall glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length
const GLubyte* __stdcall glGetString(GLenum name) const GLubyte* __stdcall glGetString(GLenum name)
{ {
TRACE("(GLenum name = 0x%X)", name); EVENT("(GLenum name = 0x%X)", name);
try try
{ {
...@@ -3234,7 +3234,7 @@ const GLubyte* __stdcall glGetString(GLenum name) ...@@ -3234,7 +3234,7 @@ const GLubyte* __stdcall glGetString(GLenum name)
void __stdcall glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) void __stdcall glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
{ {
TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)", target, pname, params); EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)", target, pname, params);
try try
{ {
...@@ -3283,7 +3283,7 @@ void __stdcall glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) ...@@ -3283,7 +3283,7 @@ void __stdcall glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
void __stdcall glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) void __stdcall glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
{ {
TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, params); EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, params);
try try
{ {
...@@ -3332,7 +3332,7 @@ void __stdcall glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) ...@@ -3332,7 +3332,7 @@ void __stdcall glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
void __stdcall glGetUniformfv(GLuint program, GLint location, GLfloat* params) void __stdcall glGetUniformfv(GLuint program, GLint location, GLfloat* params)
{ {
TRACE("(GLuint program = %d, GLint location = %d, GLfloat* params = 0x%0.8p)", program, location, params); EVENT("(GLuint program = %d, GLint location = %d, GLfloat* params = 0x%0.8p)", program, location, params);
try try
{ {
...@@ -3366,7 +3366,7 @@ void __stdcall glGetUniformfv(GLuint program, GLint location, GLfloat* params) ...@@ -3366,7 +3366,7 @@ void __stdcall glGetUniformfv(GLuint program, GLint location, GLfloat* params)
void __stdcall glGetUniformiv(GLuint program, GLint location, GLint* params) void __stdcall glGetUniformiv(GLuint program, GLint location, GLint* params)
{ {
TRACE("(GLuint program = %d, GLint location = %d, GLint* params = 0x%0.8p)", program, location, params); EVENT("(GLuint program = %d, GLint location = %d, GLint* params = 0x%0.8p)", program, location, params);
try try
{ {
...@@ -3405,7 +3405,7 @@ void __stdcall glGetUniformiv(GLuint program, GLint location, GLint* params) ...@@ -3405,7 +3405,7 @@ void __stdcall glGetUniformiv(GLuint program, GLint location, GLint* params)
int __stdcall glGetUniformLocation(GLuint program, const GLchar* name) int __stdcall glGetUniformLocation(GLuint program, const GLchar* name)
{ {
TRACE("(GLuint program = %d, const GLchar* name = 0x%0.8p)", program, name); EVENT("(GLuint program = %d, const GLchar* name = 0x%0.8p)", program, name);
try try
{ {
...@@ -3450,7 +3450,7 @@ int __stdcall glGetUniformLocation(GLuint program, const GLchar* name) ...@@ -3450,7 +3450,7 @@ int __stdcall glGetUniformLocation(GLuint program, const GLchar* name)
void __stdcall glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) void __stdcall glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
{ {
TRACE("(GLuint index = %d, GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)", index, pname, params); EVENT("(GLuint index = %d, GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)", index, pname, params);
try try
{ {
...@@ -3503,7 +3503,7 @@ void __stdcall glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) ...@@ -3503,7 +3503,7 @@ void __stdcall glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
void __stdcall glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) void __stdcall glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
{ {
TRACE("(GLuint index = %d, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", index, pname, params); EVENT("(GLuint index = %d, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", index, pname, params);
try try
{ {
...@@ -3557,7 +3557,7 @@ void __stdcall glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) ...@@ -3557,7 +3557,7 @@ void __stdcall glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
void __stdcall glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer) void __stdcall glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
{ {
TRACE("(GLuint index = %d, GLenum pname = 0x%X, GLvoid** pointer = 0x%0.8p)", index, pname, pointer); EVENT("(GLuint index = %d, GLenum pname = 0x%X, GLvoid** pointer = 0x%0.8p)", index, pname, pointer);
try try
{ {
...@@ -3586,7 +3586,7 @@ void __stdcall glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** po ...@@ -3586,7 +3586,7 @@ void __stdcall glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** po
void __stdcall glHint(GLenum target, GLenum mode) void __stdcall glHint(GLenum target, GLenum mode)
{ {
TRACE("(GLenum target = 0x%X, GLenum mode = 0x%X)", target, mode); EVENT("(GLenum target = 0x%X, GLenum mode = 0x%X)", target, mode);
try try
{ {
...@@ -3621,7 +3621,7 @@ void __stdcall glHint(GLenum target, GLenum mode) ...@@ -3621,7 +3621,7 @@ void __stdcall glHint(GLenum target, GLenum mode)
GLboolean __stdcall glIsBuffer(GLuint buffer) GLboolean __stdcall glIsBuffer(GLuint buffer)
{ {
TRACE("(GLuint buffer = %d)", buffer); EVENT("(GLuint buffer = %d)", buffer);
try try
{ {
...@@ -3647,7 +3647,7 @@ GLboolean __stdcall glIsBuffer(GLuint buffer) ...@@ -3647,7 +3647,7 @@ GLboolean __stdcall glIsBuffer(GLuint buffer)
GLboolean __stdcall glIsEnabled(GLenum cap) GLboolean __stdcall glIsEnabled(GLenum cap)
{ {
TRACE("(GLenum cap = 0x%X)", cap); EVENT("(GLenum cap = 0x%X)", cap);
try try
{ {
...@@ -3681,7 +3681,7 @@ GLboolean __stdcall glIsEnabled(GLenum cap) ...@@ -3681,7 +3681,7 @@ GLboolean __stdcall glIsEnabled(GLenum cap)
GLboolean __stdcall glIsFenceNV(GLuint fence) GLboolean __stdcall glIsFenceNV(GLuint fence)
{ {
TRACE("(GLuint fence = %d)", fence); EVENT("(GLuint fence = %d)", fence);
try try
{ {
...@@ -3709,7 +3709,7 @@ GLboolean __stdcall glIsFenceNV(GLuint fence) ...@@ -3709,7 +3709,7 @@ GLboolean __stdcall glIsFenceNV(GLuint fence)
GLboolean __stdcall glIsFramebuffer(GLuint framebuffer) GLboolean __stdcall glIsFramebuffer(GLuint framebuffer)
{ {
TRACE("(GLuint framebuffer = %d)", framebuffer); EVENT("(GLuint framebuffer = %d)", framebuffer);
try try
{ {
...@@ -3735,7 +3735,7 @@ GLboolean __stdcall glIsFramebuffer(GLuint framebuffer) ...@@ -3735,7 +3735,7 @@ GLboolean __stdcall glIsFramebuffer(GLuint framebuffer)
GLboolean __stdcall glIsProgram(GLuint program) GLboolean __stdcall glIsProgram(GLuint program)
{ {
TRACE("(GLuint program = %d)", program); EVENT("(GLuint program = %d)", program);
try try
{ {
...@@ -3761,7 +3761,7 @@ GLboolean __stdcall glIsProgram(GLuint program) ...@@ -3761,7 +3761,7 @@ GLboolean __stdcall glIsProgram(GLuint program)
GLboolean __stdcall glIsRenderbuffer(GLuint renderbuffer) GLboolean __stdcall glIsRenderbuffer(GLuint renderbuffer)
{ {
TRACE("(GLuint renderbuffer = %d)", renderbuffer); EVENT("(GLuint renderbuffer = %d)", renderbuffer);
try try
{ {
...@@ -3787,7 +3787,7 @@ GLboolean __stdcall glIsRenderbuffer(GLuint renderbuffer) ...@@ -3787,7 +3787,7 @@ GLboolean __stdcall glIsRenderbuffer(GLuint renderbuffer)
GLboolean __stdcall glIsShader(GLuint shader) GLboolean __stdcall glIsShader(GLuint shader)
{ {
TRACE("(GLuint shader = %d)", shader); EVENT("(GLuint shader = %d)", shader);
try try
{ {
...@@ -3813,7 +3813,7 @@ GLboolean __stdcall glIsShader(GLuint shader) ...@@ -3813,7 +3813,7 @@ GLboolean __stdcall glIsShader(GLuint shader)
GLboolean __stdcall glIsTexture(GLuint texture) GLboolean __stdcall glIsTexture(GLuint texture)
{ {
TRACE("(GLuint texture = %d)", texture); EVENT("(GLuint texture = %d)", texture);
try try
{ {
...@@ -3839,7 +3839,7 @@ GLboolean __stdcall glIsTexture(GLuint texture) ...@@ -3839,7 +3839,7 @@ GLboolean __stdcall glIsTexture(GLuint texture)
void __stdcall glLineWidth(GLfloat width) void __stdcall glLineWidth(GLfloat width)
{ {
TRACE("(GLfloat width = %f)", width); EVENT("(GLfloat width = %f)", width);
try try
{ {
...@@ -3863,7 +3863,7 @@ void __stdcall glLineWidth(GLfloat width) ...@@ -3863,7 +3863,7 @@ void __stdcall glLineWidth(GLfloat width)
void __stdcall glLinkProgram(GLuint program) void __stdcall glLinkProgram(GLuint program)
{ {
TRACE("(GLuint program = %d)", program); EVENT("(GLuint program = %d)", program);
try try
{ {
...@@ -3896,7 +3896,7 @@ void __stdcall glLinkProgram(GLuint program) ...@@ -3896,7 +3896,7 @@ void __stdcall glLinkProgram(GLuint program)
void __stdcall glPixelStorei(GLenum pname, GLint param) void __stdcall glPixelStorei(GLenum pname, GLint param)
{ {
TRACE("(GLenum pname = 0x%X, GLint param = %d)", pname, param); EVENT("(GLenum pname = 0x%X, GLint param = %d)", pname, param);
try try
{ {
...@@ -3937,7 +3937,7 @@ void __stdcall glPixelStorei(GLenum pname, GLint param) ...@@ -3937,7 +3937,7 @@ void __stdcall glPixelStorei(GLenum pname, GLint param)
void __stdcall glPolygonOffset(GLfloat factor, GLfloat units) void __stdcall glPolygonOffset(GLfloat factor, GLfloat units)
{ {
TRACE("(GLfloat factor = %f, GLfloat units = %f)", factor, units); EVENT("(GLfloat factor = %f, GLfloat units = %f)", factor, units);
try try
{ {
...@@ -3956,7 +3956,7 @@ void __stdcall glPolygonOffset(GLfloat factor, GLfloat units) ...@@ -3956,7 +3956,7 @@ void __stdcall glPolygonOffset(GLfloat factor, GLfloat units)
void __stdcall glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) void __stdcall glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
{ {
TRACE("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, " EVENT("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, "
"GLenum format = 0x%X, GLenum type = 0x%X, GLvoid* pixels = 0x%0.8p)", "GLenum format = 0x%X, GLenum type = 0x%X, GLvoid* pixels = 0x%0.8p)",
x, y, width, height, format, type, pixels); x, y, width, height, format, type, pixels);
...@@ -4017,7 +4017,7 @@ void __stdcall glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLe ...@@ -4017,7 +4017,7 @@ void __stdcall glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLe
void __stdcall glReleaseShaderCompiler(void) void __stdcall glReleaseShaderCompiler(void)
{ {
TRACE("()"); EVENT("()");
try try
{ {
...@@ -4031,7 +4031,7 @@ void __stdcall glReleaseShaderCompiler(void) ...@@ -4031,7 +4031,7 @@ void __stdcall glReleaseShaderCompiler(void)
void __stdcall glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) void __stdcall glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
{ {
TRACE("(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width = %d, GLsizei height = %d)", EVENT("(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width = %d, GLsizei height = %d)",
target, samples, internalformat, width, height); target, samples, internalformat, width, height);
try try
...@@ -4107,7 +4107,7 @@ void __stdcall glRenderbufferStorage(GLenum target, GLenum internalformat, GLsiz ...@@ -4107,7 +4107,7 @@ void __stdcall glRenderbufferStorage(GLenum target, GLenum internalformat, GLsiz
void __stdcall glSampleCoverage(GLclampf value, GLboolean invert) void __stdcall glSampleCoverage(GLclampf value, GLboolean invert)
{ {
TRACE("(GLclampf value = %f, GLboolean invert = %d)", value, invert); EVENT("(GLclampf value = %f, GLboolean invert = %d)", value, invert);
try try
{ {
...@@ -4126,7 +4126,7 @@ void __stdcall glSampleCoverage(GLclampf value, GLboolean invert) ...@@ -4126,7 +4126,7 @@ void __stdcall glSampleCoverage(GLclampf value, GLboolean invert)
void __stdcall glSetFenceNV(GLuint fence, GLenum condition) void __stdcall glSetFenceNV(GLuint fence, GLenum condition)
{ {
TRACE("(GLuint fence = %d, GLenum condition = 0x%X)", fence, condition); EVENT("(GLuint fence = %d, GLenum condition = 0x%X)", fence, condition);
try try
{ {
...@@ -4157,7 +4157,7 @@ void __stdcall glSetFenceNV(GLuint fence, GLenum condition) ...@@ -4157,7 +4157,7 @@ void __stdcall glSetFenceNV(GLuint fence, GLenum condition)
void __stdcall glScissor(GLint x, GLint y, GLsizei width, GLsizei height) void __stdcall glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
{ {
TRACE("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", x, y, width, height); EVENT("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", x, y, width, height);
try try
{ {
...@@ -4181,7 +4181,7 @@ void __stdcall glScissor(GLint x, GLint y, GLsizei width, GLsizei height) ...@@ -4181,7 +4181,7 @@ void __stdcall glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
void __stdcall glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) void __stdcall glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
{ {
TRACE("(GLsizei n = %d, const GLuint* shaders = 0x%0.8p, GLenum binaryformat = 0x%X, " EVENT("(GLsizei n = %d, const GLuint* shaders = 0x%0.8p, GLenum binaryformat = 0x%X, "
"const GLvoid* binary = 0x%0.8p, GLsizei length = %d)", "const GLvoid* binary = 0x%0.8p, GLsizei length = %d)",
n, shaders, binaryformat, binary, length); n, shaders, binaryformat, binary, length);
...@@ -4198,7 +4198,7 @@ void __stdcall glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryfor ...@@ -4198,7 +4198,7 @@ void __stdcall glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryfor
void __stdcall glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) void __stdcall glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
{ {
TRACE("(GLuint shader = %d, GLsizei count = %d, const GLchar** string = 0x%0.8p, const GLint* length = 0x%0.8p)", EVENT("(GLuint shader = %d, GLsizei count = %d, const GLchar** string = 0x%0.8p, const GLint* length = 0x%0.8p)",
shader, count, string, length); shader, count, string, length);
try try
...@@ -4242,7 +4242,7 @@ void __stdcall glStencilFunc(GLenum func, GLint ref, GLuint mask) ...@@ -4242,7 +4242,7 @@ void __stdcall glStencilFunc(GLenum func, GLint ref, GLuint mask)
void __stdcall glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) void __stdcall glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{ {
TRACE("(GLenum face = 0x%X, GLenum func = 0x%X, GLint ref = %d, GLuint mask = %d)", face, func, ref, mask); EVENT("(GLenum face = 0x%X, GLenum func = 0x%X, GLint ref = %d, GLuint mask = %d)", face, func, ref, mask);
try try
{ {
...@@ -4299,7 +4299,7 @@ void __stdcall glStencilMask(GLuint mask) ...@@ -4299,7 +4299,7 @@ void __stdcall glStencilMask(GLuint mask)
void __stdcall glStencilMaskSeparate(GLenum face, GLuint mask) void __stdcall glStencilMaskSeparate(GLenum face, GLuint mask)
{ {
TRACE("(GLenum face = 0x%X, GLuint mask = %d)", face, mask); EVENT("(GLenum face = 0x%X, GLuint mask = %d)", face, mask);
try try
{ {
...@@ -4341,7 +4341,7 @@ void __stdcall glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) ...@@ -4341,7 +4341,7 @@ void __stdcall glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
void __stdcall glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) void __stdcall glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
{ {
TRACE("(GLenum face = 0x%X, GLenum fail = 0x%X, GLenum zfail = 0x%X, GLenum zpas = 0x%Xs)", EVENT("(GLenum face = 0x%X, GLenum fail = 0x%X, GLenum zfail = 0x%X, GLenum zpas = 0x%Xs)",
face, fail, zfail, zpass); face, fail, zfail, zpass);
try try
...@@ -4424,7 +4424,7 @@ void __stdcall glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenu ...@@ -4424,7 +4424,7 @@ void __stdcall glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenu
GLboolean __stdcall glTestFenceNV(GLuint fence) GLboolean __stdcall glTestFenceNV(GLuint fence)
{ {
TRACE("(GLuint fence = %d)", fence); EVENT("(GLuint fence = %d)", fence);
try try
{ {
...@@ -4453,7 +4453,7 @@ GLboolean __stdcall glTestFenceNV(GLuint fence) ...@@ -4453,7 +4453,7 @@ GLboolean __stdcall glTestFenceNV(GLuint fence)
void __stdcall glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, void __stdcall glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
GLint border, GLenum format, GLenum type, const GLvoid* pixels) GLint border, GLenum format, GLenum type, const GLvoid* pixels)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, GLsizei height = %d, " EVENT("(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, GLsizei height = %d, "
"GLint border = %d, GLenum format = 0x%X, GLenum type = 0x%X, const GLvoid* pixels = 0x%0.8p)", "GLint border = %d, GLenum format = 0x%X, GLenum type = 0x%X, const GLvoid* pixels = 0x%0.8p)",
target, level, internalformat, width, height, border, format, type, pixels); target, level, internalformat, width, height, border, format, type, pixels);
...@@ -4660,7 +4660,7 @@ void __stdcall glTexParameterfv(GLenum target, GLenum pname, const GLfloat* para ...@@ -4660,7 +4660,7 @@ void __stdcall glTexParameterfv(GLenum target, GLenum pname, const GLfloat* para
void __stdcall glTexParameteri(GLenum target, GLenum pname, GLint param) void __stdcall glTexParameteri(GLenum target, GLenum pname, GLint param)
{ {
TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint param = %d)", target, pname, param); EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint param = %d)", target, pname, param);
try try
{ {
...@@ -4727,7 +4727,7 @@ void __stdcall glTexParameteriv(GLenum target, GLenum pname, const GLint* params ...@@ -4727,7 +4727,7 @@ void __stdcall glTexParameteriv(GLenum target, GLenum pname, const GLint* params
void __stdcall glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, void __stdcall glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
GLenum format, GLenum type, const GLvoid* pixels) GLenum format, GLenum type, const GLvoid* pixels)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " EVENT("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
"GLsizei width = %d, GLsizei height = %d, GLenum format = 0x%X, GLenum type = 0x%X, " "GLsizei width = %d, GLsizei height = %d, GLenum format = 0x%X, GLenum type = 0x%X, "
"const GLvoid* pixels = 0x%0.8p)", "const GLvoid* pixels = 0x%0.8p)",
target, level, xoffset, yoffset, width, height, format, type, pixels); target, level, xoffset, yoffset, width, height, format, type, pixels);
...@@ -4844,7 +4844,7 @@ void __stdcall glUniform1f(GLint location, GLfloat x) ...@@ -4844,7 +4844,7 @@ void __stdcall glUniform1f(GLint location, GLfloat x)
void __stdcall glUniform1fv(GLint location, GLsizei count, const GLfloat* v) void __stdcall glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -4888,7 +4888,7 @@ void __stdcall glUniform1i(GLint location, GLint x) ...@@ -4888,7 +4888,7 @@ void __stdcall glUniform1i(GLint location, GLint x)
void __stdcall glUniform1iv(GLint location, GLsizei count, const GLint* v) void __stdcall glUniform1iv(GLint location, GLsizei count, const GLint* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -4934,7 +4934,7 @@ void __stdcall glUniform2f(GLint location, GLfloat x, GLfloat y) ...@@ -4934,7 +4934,7 @@ void __stdcall glUniform2f(GLint location, GLfloat x, GLfloat y)
void __stdcall glUniform2fv(GLint location, GLsizei count, const GLfloat* v) void __stdcall glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -4980,7 +4980,7 @@ void __stdcall glUniform2i(GLint location, GLint x, GLint y) ...@@ -4980,7 +4980,7 @@ void __stdcall glUniform2i(GLint location, GLint x, GLint y)
void __stdcall glUniform2iv(GLint location, GLsizei count, const GLint* v) void __stdcall glUniform2iv(GLint location, GLsizei count, const GLint* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -5026,7 +5026,7 @@ void __stdcall glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) ...@@ -5026,7 +5026,7 @@ void __stdcall glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
void __stdcall glUniform3fv(GLint location, GLsizei count, const GLfloat* v) void __stdcall glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -5072,7 +5072,7 @@ void __stdcall glUniform3i(GLint location, GLint x, GLint y, GLint z) ...@@ -5072,7 +5072,7 @@ void __stdcall glUniform3i(GLint location, GLint x, GLint y, GLint z)
void __stdcall glUniform3iv(GLint location, GLsizei count, const GLint* v) void __stdcall glUniform3iv(GLint location, GLsizei count, const GLint* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -5118,7 +5118,7 @@ void __stdcall glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfl ...@@ -5118,7 +5118,7 @@ void __stdcall glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfl
void __stdcall glUniform4fv(GLint location, GLsizei count, const GLfloat* v) void __stdcall glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLfloat* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -5164,7 +5164,7 @@ void __stdcall glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) ...@@ -5164,7 +5164,7 @@ void __stdcall glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
void __stdcall glUniform4iv(GLint location, GLsizei count, const GLint* v) void __stdcall glUniform4iv(GLint location, GLsizei count, const GLint* v)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v); EVENT("(GLint location = %d, GLsizei count = %d, const GLint* v = 0x%0.8p)", location, count, v);
try try
{ {
...@@ -5203,7 +5203,7 @@ void __stdcall glUniform4iv(GLint location, GLsizei count, const GLint* v) ...@@ -5203,7 +5203,7 @@ void __stdcall glUniform4iv(GLint location, GLsizei count, const GLint* v)
void __stdcall glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) void __stdcall glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat* value = 0x%0.8p)", EVENT("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat* value = 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
try try
...@@ -5243,7 +5243,7 @@ void __stdcall glUniformMatrix2fv(GLint location, GLsizei count, GLboolean trans ...@@ -5243,7 +5243,7 @@ void __stdcall glUniformMatrix2fv(GLint location, GLsizei count, GLboolean trans
void __stdcall glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) void __stdcall glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat* value = 0x%0.8p)", EVENT("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat* value = 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
try try
...@@ -5283,7 +5283,7 @@ void __stdcall glUniformMatrix3fv(GLint location, GLsizei count, GLboolean trans ...@@ -5283,7 +5283,7 @@ void __stdcall glUniformMatrix3fv(GLint location, GLsizei count, GLboolean trans
void __stdcall glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) void __stdcall glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{ {
TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat* value = 0x%0.8p)", EVENT("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat* value = 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
try try
...@@ -5323,7 +5323,7 @@ void __stdcall glUniformMatrix4fv(GLint location, GLsizei count, GLboolean trans ...@@ -5323,7 +5323,7 @@ void __stdcall glUniformMatrix4fv(GLint location, GLsizei count, GLboolean trans
void __stdcall glUseProgram(GLuint program) void __stdcall glUseProgram(GLuint program)
{ {
TRACE("(GLuint program = %d)", program); EVENT("(GLuint program = %d)", program);
try try
{ {
...@@ -5361,7 +5361,7 @@ void __stdcall glUseProgram(GLuint program) ...@@ -5361,7 +5361,7 @@ void __stdcall glUseProgram(GLuint program)
void __stdcall glValidateProgram(GLuint program) void __stdcall glValidateProgram(GLuint program)
{ {
TRACE("(GLuint program = %d)", program); EVENT("(GLuint program = %d)", program);
try try
{ {
...@@ -5394,7 +5394,7 @@ void __stdcall glValidateProgram(GLuint program) ...@@ -5394,7 +5394,7 @@ void __stdcall glValidateProgram(GLuint program)
void __stdcall glVertexAttrib1f(GLuint index, GLfloat x) void __stdcall glVertexAttrib1f(GLuint index, GLfloat x)
{ {
TRACE("(GLuint index = %d, GLfloat x = %f)", index, x); EVENT("(GLuint index = %d, GLfloat x = %f)", index, x);
try try
{ {
...@@ -5419,7 +5419,7 @@ void __stdcall glVertexAttrib1f(GLuint index, GLfloat x) ...@@ -5419,7 +5419,7 @@ void __stdcall glVertexAttrib1f(GLuint index, GLfloat x)
void __stdcall glVertexAttrib1fv(GLuint index, const GLfloat* values) void __stdcall glVertexAttrib1fv(GLuint index, const GLfloat* values)
{ {
TRACE("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values); EVENT("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values);
try try
{ {
...@@ -5444,7 +5444,7 @@ void __stdcall glVertexAttrib1fv(GLuint index, const GLfloat* values) ...@@ -5444,7 +5444,7 @@ void __stdcall glVertexAttrib1fv(GLuint index, const GLfloat* values)
void __stdcall glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) void __stdcall glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{ {
TRACE("(GLuint index = %d, GLfloat x = %f, GLfloat y = %f)", index, x, y); EVENT("(GLuint index = %d, GLfloat x = %f, GLfloat y = %f)", index, x, y);
try try
{ {
...@@ -5469,7 +5469,7 @@ void __stdcall glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) ...@@ -5469,7 +5469,7 @@ void __stdcall glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
void __stdcall glVertexAttrib2fv(GLuint index, const GLfloat* values) void __stdcall glVertexAttrib2fv(GLuint index, const GLfloat* values)
{ {
TRACE("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values); EVENT("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values);
try try
{ {
...@@ -5494,7 +5494,7 @@ void __stdcall glVertexAttrib2fv(GLuint index, const GLfloat* values) ...@@ -5494,7 +5494,7 @@ void __stdcall glVertexAttrib2fv(GLuint index, const GLfloat* values)
void __stdcall glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) void __stdcall glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{ {
TRACE("(GLuint index = %d, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", index, x, y, z); EVENT("(GLuint index = %d, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", index, x, y, z);
try try
{ {
...@@ -5519,7 +5519,7 @@ void __stdcall glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) ...@@ -5519,7 +5519,7 @@ void __stdcall glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
void __stdcall glVertexAttrib3fv(GLuint index, const GLfloat* values) void __stdcall glVertexAttrib3fv(GLuint index, const GLfloat* values)
{ {
TRACE("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values); EVENT("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values);
try try
{ {
...@@ -5544,7 +5544,7 @@ void __stdcall glVertexAttrib3fv(GLuint index, const GLfloat* values) ...@@ -5544,7 +5544,7 @@ void __stdcall glVertexAttrib3fv(GLuint index, const GLfloat* values)
void __stdcall glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) void __stdcall glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{ {
TRACE("(GLuint index = %d, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f, GLfloat w = %f)", index, x, y, z, w); EVENT("(GLuint index = %d, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f, GLfloat w = %f)", index, x, y, z, w);
try try
{ {
...@@ -5569,7 +5569,7 @@ void __stdcall glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, G ...@@ -5569,7 +5569,7 @@ void __stdcall glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, G
void __stdcall glVertexAttrib4fv(GLuint index, const GLfloat* values) void __stdcall glVertexAttrib4fv(GLuint index, const GLfloat* values)
{ {
TRACE("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values); EVENT("(GLuint index = %d, const GLfloat* values = 0x%0.8p)", index, values);
try try
{ {
...@@ -5593,7 +5593,7 @@ void __stdcall glVertexAttrib4fv(GLuint index, const GLfloat* values) ...@@ -5593,7 +5593,7 @@ void __stdcall glVertexAttrib4fv(GLuint index, const GLfloat* values)
void __stdcall glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) void __stdcall glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
{ {
TRACE("(GLuint index = %d, GLint size = %d, GLenum type = 0x%X, " EVENT("(GLuint index = %d, GLint size = %d, GLenum type = 0x%X, "
"GLboolean normalized = %d, GLsizei stride = %d, const GLvoid* ptr = 0x%0.8p)", "GLboolean normalized = %d, GLsizei stride = %d, const GLvoid* ptr = 0x%0.8p)",
index, size, type, normalized, stride, ptr); index, size, type, normalized, stride, ptr);
...@@ -5642,7 +5642,7 @@ void __stdcall glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLbo ...@@ -5642,7 +5642,7 @@ void __stdcall glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLbo
void __stdcall glViewport(GLint x, GLint y, GLsizei width, GLsizei height) void __stdcall glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
{ {
TRACE("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", x, y, width, height); EVENT("(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", x, y, width, height);
try try
{ {
...@@ -5667,7 +5667,7 @@ void __stdcall glViewport(GLint x, GLint y, GLsizei width, GLsizei height) ...@@ -5667,7 +5667,7 @@ void __stdcall glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
void __stdcall glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, void __stdcall glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter) GLbitfield mask, GLenum filter)
{ {
TRACE("(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, " EVENT("(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, "
"GLint dstX0 = %d, GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, " "GLint dstX0 = %d, GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, "
"GLbitfield mask = 0x%X, GLenum filter = 0x%X)", "GLbitfield mask = 0x%X, GLenum filter = 0x%X)",
srcX0, srcY0, srcX1, srcX1, dstX0, dstY0, dstX1, dstY1, mask, filter); srcX0, srcY0, srcX1, srcX1, dstX0, dstY0, dstX1, dstY1, mask, filter);
...@@ -5715,7 +5715,7 @@ void __stdcall glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLi ...@@ -5715,7 +5715,7 @@ void __stdcall glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLi
void __stdcall glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, void __stdcall glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum format, GLenum type, const GLvoid* pixels) GLint border, GLenum format, GLenum type, const GLvoid* pixels)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, " EVENT("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, "
"GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLint border = %d, " "GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLint border = %d, "
"GLenum format = 0x%X, GLenum type = 0x%x, const GLvoid* pixels = 0x%0.8p)", "GLenum format = 0x%X, GLenum type = 0x%x, const GLvoid* pixels = 0x%0.8p)",
target, level, internalformat, width, height, depth, border, format, type, pixels); target, level, internalformat, width, height, depth, border, format, type, pixels);
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="D3dx9.lib" AdditionalDependencies="d3d9.lib D3dx9.lib"
LinkIncremental="2" LinkIncremental="2"
ModuleDefinitionFile="libGLESv2.def" ModuleDefinitionFile="libGLESv2.def"
GenerateDebugInformation="true" GenerateDebugInformation="true"
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="D3dx9.lib" AdditionalDependencies="d3d9.lib D3dx9.lib"
LinkIncremental="1" LinkIncremental="1"
IgnoreAllDefaultLibraries="false" IgnoreAllDefaultLibraries="false"
ModuleDefinitionFile="libGLESv2.def" ModuleDefinitionFile="libGLESv2.def"
......
...@@ -119,23 +119,23 @@ void error(GLenum errorCode) ...@@ -119,23 +119,23 @@ void error(GLenum errorCode)
{ {
case GL_INVALID_ENUM: case GL_INVALID_ENUM:
context->recordInvalidEnum(); context->recordInvalidEnum();
gl::trace("\t! Error generated: invalid enum\n"); TRACE("\t! Error generated: invalid enum\n");
break; break;
case GL_INVALID_VALUE: case GL_INVALID_VALUE:
context->recordInvalidValue(); context->recordInvalidValue();
gl::trace("\t! Error generated: invalid value\n"); TRACE("\t! Error generated: invalid value\n");
break; break;
case GL_INVALID_OPERATION: case GL_INVALID_OPERATION:
context->recordInvalidOperation(); context->recordInvalidOperation();
gl::trace("\t! Error generated: invalid operation\n"); TRACE("\t! Error generated: invalid operation\n");
break; break;
case GL_OUT_OF_MEMORY: case GL_OUT_OF_MEMORY:
context->recordOutOfMemory(); context->recordOutOfMemory();
gl::trace("\t! Error generated: out of memory\n"); TRACE("\t! Error generated: out of memory\n");
break; break;
case GL_INVALID_FRAMEBUFFER_OPERATION: case GL_INVALID_FRAMEBUFFER_OPERATION:
context->recordInvalidFramebufferOperation(); context->recordInvalidFramebufferOperation();
gl::trace("\t! Error generated: invalid framebuffer operation\n"); TRACE("\t! Error generated: invalid framebuffer operation\n");
break; break;
default: UNREACHABLE(); default: UNREACHABLE();
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include "libGLESv2/utilities.h" #include "libGLESv2/utilities.h"
#include <limits> #include <limits>
#include <stdio.h>
#include <windows.h>
#include "common/debug.h" #include "common/debug.h"
...@@ -847,3 +849,36 @@ GLenum ConvertDepthStencilFormat(D3DFORMAT format) ...@@ -847,3 +849,36 @@ GLenum ConvertDepthStencilFormat(D3DFORMAT format)
} }
} }
std::string getTempPath()
{
char path[MAX_PATH];
DWORD pathLen = GetTempPathA(sizeof(path) / sizeof(path[0]), path);
if (pathLen == 0)
{
UNREACHABLE();
return std::string();
}
UINT unique = GetTempFileNameA(path, "sh", 0, path);
if (unique == 0)
{
UNREACHABLE();
return std::string();
}
return path;
}
void writeFile(const char* path, const void* content, size_t size)
{
FILE* file = fopen(path, "w");
if (!file)
{
UNREACHABLE();
return;
}
fwrite(content, sizeof(char), size, file);
fclose(file);
}
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <GLES2/gl2ext.h> #include <GLES2/gl2ext.h>
#include <d3d9.h> #include <d3d9.h>
#include <string>
namespace gl namespace gl
{ {
...@@ -78,4 +80,7 @@ GLenum ConvertDepthStencilFormat(D3DFORMAT format); ...@@ -78,4 +80,7 @@ GLenum ConvertDepthStencilFormat(D3DFORMAT format);
} }
std::string getTempPath();
void writeFile(const char* path, const void* data, size_t size);
#endif // LIBGLESV2_UTILITIES_H #endif // LIBGLESV2_UTILITIES_H
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