Closed dhardy closed 3 years ago
Build succeeded:
@kvark should we expect the padded range to be zeroed already though? If not, could we move this zeroing down to wgpu-core?
@grovesNL in wgpu-core you can't create a mapped buffer that is not rounded to 4 bytes already. So it doesn't have a problem. Only wgpu-rs utils have this issue, since they try to be more flexible than wgpu-core itself.
Alright yeah that makes sense to me. In that case though how could we end up with non-zero values in the extra padded range (i.e. the last unpadded_size % 4
bytes)? I thought zeroing it here would be redundant, because it should be zeroed already (in wgpu-core/Gecko)
Indeed, you are right, wgpu-core recently got this functionality. We can remove that code now from utils.
Already merged or I would adjust this PR. I'll let you fold into another.
But good to know that the zeroing is redundant. :+1:
Also, why bother setting the padding bytes to 0?