JolifantoBambla / webgpu-spd

A port of AMD's Single Pass Downsampler for WebGPU
https://jolifantobambla.github.io/webgpu-spd/
MIT License
13 stars 0 forks source link

Question/Issue: regarding max array layers #5

Closed ivoleitao closed 4 months ago

ivoleitao commented 4 months ago

Hi,

First of all thanks a lot for this lib. I'm currently porting it to rust and wgpu and adapting to my scenario and it's mostly done. However while looking into your code I'm a bit puzzled with the following line:

https://github.com/JolifantoBambla/webgpu-spd/blob/afbd01b8de0fbc709184a0230cba4f32c876902d/src/index.ts#L941

This does not seem to perform anything useful and seems like either a bug or a placeholder for some future change... What's the purpose of this line ?

Regards,

JolifantoBambla commented 4 months ago

Hi, thanks for reporting! :) That is indeed a bug: it should check for target.depthOrArrayLayers instead, to split downsampling into multiple passes if the number of array layers exceeds the maximum number of array layers that can be handled within a single pass.

ivoleitao commented 4 months ago

Ha ok, I was not sure but that's what I though as well.

Thanks !