vulkano-rs / vulkano

Safe and rich Rust wrapper around the Vulkan API
Apache License 2.0
4.45k stars 435 forks source link

Image offsets are compared with the `min_texel_gather_offset` device property as u64 instead of i32. #2504

Open LukeP0WERS opened 5 months ago

LukeP0WERS commented 5 months ago

When I updated to the vulkano master branch I got this error: create_info.stage.entry_point: an `OpImageSample*` or `OpImageFetch*` instruction is performed, but its `ConstOffset` image operand contains a value that is less than the `min_texel_offset` device limit even though the min_texel_gather_offset for my device is -8 and all of my offsets are 0 or 1.

It should be comparing with i32 instead of u64 here: https://github.com/vulkano-rs/vulkano/blob/93b6e9401f694fb7d64b16409a8dfc63204a0f70/vulkano/src/pipeline/shader/validate_runtime.rs#L2540

Rua commented 5 months ago

A nice example of how evil as can be!