Commit Graph
5 Commits
Author SHA1 Message Date
Jim Blandy 1b09a44af5 [naga spv-out] Avoid duplicating SPIR-V OpTypePointer instructions.
Simplify `naga::back::spv::LocalType` to have only one variant for
representing pointers, and use the SPIR-V type as the base type, so
that `LocalType` values are equal when the SPIR-V pointer types they
map to would be equal as well.

This avoids emitting multiple `OpTypePointer` instructions, which
SPIR-V would interpret as distinct types, for equivalent Naga IR
pointer types.

Change the `get_pointer_type_id` utility function accordingly, and
adjust its callers.

Change `LocalType::from_inner` into `Writer::localtype_from_inner`, so
that it can call `Writer` methods to build base types. Adjust users.
2025-03-06 09:58:25 -08:00
Vecvec 73401ede25 Fix double decoration if a binding array contains a struct with a runtime array (#5776) 2024-06-10 11:20:33 +02:00
Dzmitry Malyshau 3a467ad93d spv-out: Support arrayLength of a dynamically indexed bindings array 2024-04-02 19:22:34 +02:00
Dzmitry Malyshau bfe0b90740 spv-out: implement OpArrayLength on array buffer bindings 2024-04-02 19:22:34 +02:00
Connor Fitzgerald 5369eec3b2 Move naga to subfolder 2023-10-25 14:25:04 -04:00