my
@nonempty_keys
=
qw/maxBindGroups maxBufferSize minUniformBufferOffsetAlignment/
;
my
$wgpu
= WebGPU::Direct->new;
my
$adapter
=
$wgpu
->RequestAdapter( {
compatibleSurface
=>
undef
} );
my
$device
=
$adapter
->RequestDevice;
my
$supported_limits
=
$wgpu
->SupportedLimits->new;
my
%limits
=
$supported_limits
->limits->%*;
$adapter
->GetLimits(
$supported_limits
);
foreach
my
$k
(
@nonempty_keys
)
{
isnt(
$supported_limits
->limits->
$k
,
$limits
{
$k
},
"$k differs like it should"
);
}
$adapter
->GetLimits( {} );
ok( 1,
'Can call useless population of limits without results'
);
done_testing;