Commit Graph
12 Commits
Author SHA1 Message Date
Jim Blandy 412d5aa62e [wgsl-in] Generate Expression::Literal. 2023-05-11 07:09:53 -07:00
teoxoy eccdc0aeb1 [spv-out] omit extra switch case blocks where possible 2022-12-09 10:21:58 -08:00
teoxoy be70a2ec03 [spv-out] fix switch cases after default not being output 2022-12-09 10:21:58 -08:00
teoxoy e05706bc48 [wgsl] remove fallthrough statement
also add support for default to be used with other case selectors
2022-12-09 10:21:58 -08:00
Jim Blandy b209d91168 [spv-out] Properly combine the fixes for #2035 and #2038.
The Vulkan decoration rules require us to distinguish vertex shader
inputs, fragment shader inputs, and everything else, so just pass the
stage to `Writer::write_varying`. Together with the SPIRV storage
class, this is sufficient to distinguish all the cases in a way that
closely follows the spec language.
2022-09-01 15:55:42 -07:00
Nicolas Silva b63436af36 Decorate most builtins as Flat in the spirv writer.
Fixes #2032
2022-09-01 10:27:19 -07:00
teoxoy 91ee407c87 [hlsl-out] fix fallthrough in switch statements 2022-05-30 13:11:56 -07:00
teoxoy 239bbbbed4 [spv-out] zero init variables in function and private address spaces 2022-05-10 10:44:40 +02:00
João Capucho d5fc05e8a4 Allow unsigned integers in switch 2021-09-21 17:16:51 -04:00
Hans Christian Schmitz 8417f849b1 Fix GLSL output for non-fallthrough switch cases (#1310)
* Fix GLSL output for non-fallthrough switch cases

Partially reverts 02c74b5002 and
fixes #1309.

* Fix indentation of control-flow WGSL code

* Clean up glsl-out switch case fallthrough handling

Only insert a break if needed
and if a case is fallthrough, insert a comment indicating this.
2021-08-31 17:48:28 -04:00
Jim Blandy cb0ad2504c [spv-out] Handle break and continue in switch statements.
Fixes #1030.
Fixes #1017.
2021-08-27 16:39:59 -07:00
Gordon-F 6cdd332cef Reorganize test snapshot folder 2021-06-19 10:19:04 -04:00