package
WebGPU::Direct::BindGroupEntry
{
no
warnings
qw(experimental::signatures)
;
sub
BUILDARGS (
$class
,
$args
)
{
croak
"$args->{buffer} is not of type WebGPU::Direct::Buffer"
if
ref
$args
->{buffer} ne
'WebGPU::Direct::Buffer'
;
if
( !
exists
$args
->{offset} )
{
$args
->{offset} = 0;
}
if
( !
exists
$args
->{size} )
{
$args
->{size} =
$args
->{buffer}->GetSize -
$args
->{offset};
}
return
$args
;
}
};
1;