From: Not Zed Date: Wed, 27 Apr 2022 05:31:35 +0000 (+0930) Subject: Suppress some debug outputs. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=e691d20e6bc02107629083c1708256e172ac3fa1;p=panamaz Suppress some debug outputs. --- diff --git a/src/notzed.vulkan/gen/generate-vulkan b/src/notzed.vulkan/gen/generate-vulkan index c3063a6..f1477e2 100755 --- a/src/notzed.vulkan/gen/generate-vulkan +++ b/src/notzed.vulkan/gen/generate-vulkan @@ -54,7 +54,7 @@ my $sys = {}; $sys->{output} = 'bin/gen/notzed.vulkan/classes'; $sys->{package} = 'vulkan'; -$sys->{verbose} = 1; +$sys->{verbose} = 0; my $structTypes = loadTypes($api, 'struct-types.api'); my $commandTypes = loadTypes($api, 'command-types.api'); @@ -135,7 +135,7 @@ foreach my $s (values %{$api->{commands}}) { if ($last->{deref} eq 'handle*') { if (!$last->{len}) { my $t = $api->{handles}->{$last->{baseType}}; - print "constructor: $s->{name}\n";# if $sys->{verbose}; + print "constructor: $s->{name}\n" if $sys->{verbose}; $override->{$last->{name}}->{type} = $t->{type} eq 'VK_DEFINE_HANDLE' && $t->{name} ne 'VkInstance' ? 'dispatch*-output' : 'handle*-output'; @@ -161,8 +161,9 @@ foreach my $s (values %{$api->{commands}}) { .join(', ', map { $_->{len} ? "$_->{deref} \[$_->{len}\]" : $_->{deref} } @{$s->{items}}) .")"; - print "array-constructor: $protoa\n"; - print "array-constructor: $protob\n"; + print "array-constructor: $protoa\n" if $sys->{verbose} > 1; + print "array-constructor: $protob\n" if $sys->{verbose} > 1; + $override->{template} = defined($s->{extensions}) ? $commandTypes->{templates}->{'method-extension-query'} : @@ -224,8 +225,6 @@ foreach my $s (values %{$api->{commands}}) { my $overrides = $structTypes->{overrides}; my $templates = $structTypes->{templates}; - print Dumper(\%defaultTemplate); - foreach my $k (keys %defaultTemplate) { print "what?: ".Dumper($overrides->{$k}->{template}) if defined($overrides->{$k}) && defined($overrides->{$k}->{template}); next if defined($overrides->{$k}) && defined($overrides->{$k}->{template}); @@ -235,7 +234,7 @@ foreach my $s (values %{$api->{commands}}) { $name .= "-array" if $t->{array}; - print "$name: $k\n"; + print "$name: $k\n" if $sys->{verbose} > 1; die "No override $k $name" if !$templates->{$name}; $overrides->{$k}->{template} = $templates->{$name}; } @@ -844,9 +843,9 @@ sub analyseTypes { if ($first->{name} eq 'sType' && $second && $second->{name} eq 'pNext') { $first->{'no-setall'} = 1; $second->{'no-setall'} = 1; - print "typed: $s->{name}\n"; + print "typed: $s->{name}\n" if $sys->{verbose} > 1; } else { - print "untyped: $s->{name}\n"; + print "untyped: $s->{name}\n" if $sys->{verbose} > 1; } }