Alexandre Julliard : opengl32: Generate the correct trace arguments for UINT64 types.
Alexandre Julliard
julliard at winehq.org
Thu May 28 09:39:45 CDT 2009
Module: wine
Branch: master
Commit: 926681fead6cf38d4868937445a54f487c74d766
URL: http://source.winehq.org/git/wine.git/?a=commit;h=926681fead6cf38d4868937445a54f487c74d766
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu May 28 15:23:10 2009 +0200
opengl32: Generate the correct trace arguments for UINT64 types.
---
dlls/opengl32/make_opengl | 56 ++++++++++++++++++++++++++++++-------------
dlls/opengl32/opengl_ext.c | 4 +-
2 files changed, 41 insertions(+), 19 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl
index 7235b28..752ac87 100755
--- a/dlls/opengl32/make_opengl
+++ b/dlls/opengl32/make_opengl
@@ -88,17 +88,24 @@ my %cat_1_0 = ( "display-list" => 1,
"pixel-op" => 1,
"pixel-rw" => 1,
"state-req" => 1,
- "xform" => 1 );
+ "xform" => 1,
+ "VERSION_1_0" => 1,
+ "VERSION_1_0_DEPRECATED" => 1 );
my %cat_1_1 = ( %cat_1_0,
- "1_1" => 1 );
+ "VERSION_1_1" => 1,
+ "VERSION_1_1_DEPRECATED" => 1 );
my %cat_1_2 = ( %cat_1_1,
- "VERSION_1_2" => 1 );
+ "VERSION_1_2" => 1,
+ "VERSION_1_2_DEPRECATED" => 1 );
my %cat_1_3 = ( %cat_1_2,
- "VERSION_1_3" => 1 );
+ "VERSION_1_3" => 1,
+ "VERSION_1_3_DEPRECATED" => 1 );
my %cat_1_4 = ( %cat_1_3,
- "VERSION_1_4" => 1 );
+ "VERSION_1_4" => 1,
+ "VERSION_1_4_DEPRECATED" => 1 );
my %cat_1_5 = ( %cat_1_4,
- "VERSION_1_5" => 1 );
+ "VERSION_1_5" => 1,
+ "VERSION_1_5_DEPRECATED" => 1 );
my %norm_categories = ();
@@ -130,7 +137,9 @@ my %debug_conv =
"GLhandleARB" => "%d",
"GLcharARB" => "%c",
"GLvoid" => "(void)",
- "_GLfuncptr" => "%p");
+ "_GLfuncptr" => "%p",
+ "UINT64" => "%s,wine_dbgstr_longlong(%s)"
+ );
#
# This hash table gives the conversion between OpenGL types and what
@@ -215,6 +224,7 @@ sub GenerateThunk($$$$$)
my ($func_ref, $comment, $prefix, $thread_safe, $local_var) = @_;
my $ret = "";
my $call_arg = "";
+ my $trace_call_arg = "";
my $trace_arg = "";
return "" if $func_ref->[0] eq "glGetString";
@@ -235,20 +245,32 @@ sub GenerateThunk($$$$$)
## print $func_ref->[2]->[$i]->[1] . "\n";
my $type = $func_ref->[2]->[$i]->[0];
my $name = ConvertVarName($func_ref->[2]->[$i]->[1]);
- $ret = $ret . ConvertType($type) . " $name";
- $call_arg = "$call_arg$name";
+ $ret .= ConvertType($type) . " $name";
+ $call_arg .= $name;
if ($type =~ /\*/) {
- $trace_arg = "$trace_arg\%p";
+ $trace_arg .= "%p";
+ $trace_call_arg .= $name;
} else {
- $trace_arg = "$trace_arg$debug_conv{$type}";
+ if ($debug_conv{$type} =~ /(.*),(.*)/)
+ {
+ $trace_arg .= $1;
+ $trace_call_arg .= sprintf $2, $name;
+ }
+ else
+ {
+ $trace_arg .= $debug_conv{$type};
+ $trace_call_arg .= $name;
+ }
}
if ($i+1 < @{$func_ref->[2]}) {
- $ret = "$ret, ";
- $call_arg = "$call_arg, ";
- $trace_arg = "$trace_arg, ";
+ $ret .= ", ";
+ $call_arg .= ", ";
+ $trace_call_arg .= ", ";
+ $trace_arg .= ", ";
} else {
- $ret = "$ret ";
- $call_arg = "$call_arg ";
+ $ret .= " ";
+ $call_arg .= " ";
+ $trace_call_arg .= " ";
}
}
$ret .= 'void ' if (!@{$func_ref->[2]});
@@ -260,7 +282,7 @@ sub GenerateThunk($$$$$)
if ($gen_traces) {
$ret = "$ret TRACE(\"($trace_arg)\\n\"";
if ($trace_arg ne "") {
- $ret = "$ret, $call_arg";
+ $ret .= ", $trace_call_arg";
}
$ret = "$ret);\n";
}
diff --git a/dlls/opengl32/opengl_ext.c b/dlls/opengl32/opengl_ext.c
index ae12241..81cc1d2 100644
--- a/dlls/opengl32/opengl_ext.c
+++ b/dlls/opengl32/opengl_ext.c
@@ -8730,7 +8730,7 @@ static void WINAPI wine_glPolygonOffsetEXT( GLfloat factor, GLfloat bias ) {
static void WINAPI wine_glPresentFrameDualFillNV( GLuint video_slot, UINT64 minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3 ) {
void (*func_glPresentFrameDualFillNV)( GLuint, UINT64, GLuint, GLuint, GLenum, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint ) = extension_funcs[EXT_glPresentFrameDualFillNV];
- TRACE("(%d, %lld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3 );
+ TRACE("(%d, %s, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", video_slot, wine_dbgstr_longlong(minPresentTime), beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3 );
ENTER_GL();
func_glPresentFrameDualFillNV( video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3 );
LEAVE_GL();
@@ -8738,7 +8738,7 @@ static void WINAPI wine_glPresentFrameDualFillNV( GLuint video_slot, UINT64 minP
static void WINAPI wine_glPresentFrameKeyedNV( GLuint video_slot, UINT64 minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1 ) {
void (*func_glPresentFrameKeyedNV)( GLuint, UINT64, GLuint, GLuint, GLenum, GLenum, GLuint, GLuint, GLenum, GLuint, GLuint ) = extension_funcs[EXT_glPresentFrameKeyedNV];
- TRACE("(%d, %lld, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1 );
+ TRACE("(%d, %s, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", video_slot, wine_dbgstr_longlong(minPresentTime), beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1 );
ENTER_GL();
func_glPresentFrameKeyedNV( video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1 );
LEAVE_GL();
More information about the wine-cvs
mailing list