Commit Graph

14 Commits

Author SHA1 Message Date
Arman Uguray
00be08e9f8 [msl-out] Replace per_stage_map with per_entry_point_map (#2237)
The existing `per_stage_map` field of MSL backend options specifies
resource binding maps that apply to all entry points of each stage type.
It is useful to have the ability to provide a separate binding index map
for each entry point, especially when the same shader module defines
multiple entry points of the same stage kind.

This patch replaces `per_stage_map` with a new `per_entry_point_map`
option where resources are keyed by the entry-point function name.
2023-02-22 18:15:39 +01:00
teoxoy
c7d02151f0 add support for zero-initializing workgroup memory 2023-01-25 18:07:48 +01:00
Teodor Tanasoaia
27d38aae33 [hlsl-out] More matCx2 fixes (#1989)
* [hlsl-out] fix matCx2 as global uniform

* [hlsl-out] update comments

* [hlsl-out] fix `row_major` not being written on global arrays of matrices and also write it on nested arrays of matrices

* [hlsl-out] fix matCx2's nested inside global arrays

* [hlsl-out] fix struct members of type array<matCx2>

* [hlsl-out] test mat2x4 to make sure our matCx2 code behaves properly
2022-06-27 15:56:10 -07:00
Hasan Ali
205ea6cc5c Fix hlsl output for writes to scalar/vector storage buffer 2022-05-10 22:46:47 +02:00
Teodor Tanasoaia
7aaac25fbf [hlsl-out] fix matCx2 translation for uniform buffers (#1802)
* [hlsl-out] fix matCx2 translation

* fix msl validation (warning: unused variable)

* fix msl buffer declaration

* address comments
2022-04-10 22:29:11 -07:00
Dzmitry Malyshau
79845371d3 msl: qualify read-only storage with const 2022-03-06 19:28:15 -08:00
Dzmitry Malyshau
f4ba74544a Refactor snapshot test arguments to avoid checking for deserialize feature too often.
We can safely assume that deserialize is enabled for all output tests.
Supporting other modes of operation has low utility.

This change also adds an option to skip the explicit types for WGSL output.
2021-11-26 11:36:46 -05:00
Dzmitry Malyshau
52d74e91a4 spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
Dzmitry Malyshau
8c371e8063 Atomic expressions, support in backends except HLSL and the validator. 2021-08-10 21:48:02 -04:00
Dzmitry Malyshau
57b3256020 [glsl-out] binding location mapping 2021-06-27 01:09:53 -04:00
Dzmitry Malyshau
6c1832c8ee [spv-out] be smarter about deriving capabilities, auto derive them for tests 2021-05-19 02:01:25 -04:00
Lachlan Sneff
f6da21f8dd Unify back::msl push constants map and sizes buffer (#825)
* Unify back::msl push constants map and sizes buffer

* Fix clippy warning

* Actually remove PushConstantsMap

* Update snapshots
2021-05-03 21:51:44 -04:00
Lachlan Sneff
232fd65ec7 Add support for retrieving array length in msl backend (#806)
* Add support for arrayLength to the wgsl frontend

* Fix clippy warning

* Add draft support for array length to the msl backend

* Finalize support for array length in msl

* Convert buffer size to array length in msl backend

* Fix clippy warning

* Fix misleading documentation

* Changes based on review of PR

* Use a fake binding for sizes buffer in msl backend if necessary

* Only generate the msl buffer size structure if globals are present that have unsized arrays

* Make sure to generate separators

* Replace uses_unsized_buffers with !self.runtime_sized_buffers.is_empty()

* Clear self.runtime_sized_buffers

* Run snapshot of shadow.msl

* Add Expression::ArrayLength support to the spirv backend

* Remove wgsl target from the access snapshot test

* Update access.msl snapshot

* Update stack size for msl backend

* Update stack size again for msl backend
2021-04-30 22:40:32 -04:00
Dzmitry Malyshau
bb716f9c10 [spv-out] implement array value indexing (#723) 2021-04-16 17:11:18 -04:00