Commit Graph
20 Commits
Author SHA1 Message Date
Imbris 6d7975eb3b [naga hlsl-out glsl-out] Work around backend loop/switch bugs.
Introduce a new module, `naga::back::continue_forward`, containing
shared code for rendering Naga `Continue` statements as backend
`break` statements and assignments to introduced `bool` locals.
See the module's documentation for details.

- [hlsl-out] Transform degenerate single body switches into `do-while`
  loops. Properly render `Continue` statements enclosed by
  `Switch` statements enclosed by `Loop` statements.

- [glsl-out] Transform degenerate single body switches into `do-while`
  loops.

Improve `naga xtask validate spv` error message.

Fixes #4485.
Fixes #4514.
2024-07-23 18:12:19 -07:00
Imbris abc0b30dfc Add test case for builtin only accessed in function parsed after the entry point function 2024-02-15 18:12:25 +01:00
Imbris 8b818a2076 Defer entry-point processing so that all potential uses of builtin's are found before culling the unused ones 2024-02-15 18:12:25 +01:00
Imbris 6223af3860 Extract entry point processing from parse_function into an independent function. 2024-02-15 18:12:25 +01:00
Imbris ae22743326 Add test case to naga/spv-in for an unnamed glPerVertex struct 2024-02-15 18:12:25 +01:00
Imbris 4554f852c1 [spv-in] Remove providing "perVertexStruct" for certain unnamed inputs
since we probably shouldn't be naming things if they don't have a name
in the input.

As requested here: https://github.com/gfx-rs/wgpu/pull/5227#issuecomment-1936027091
2024-02-15 18:12:25 +01:00
Imbris b704132b4c Remove unnecessary "gl_PerVertex" name check so unused builtins will be
handled even when this name is not in the input SPIRV.
2024-02-15 18:12:25 +01:00
Imbris 8a7240cdbe Address review comments with small factoring out of conditional failure test pattern. 2022-11-02 02:14:42 -04:00
Imbris 688643d2b6 Indicate in MAPPABLE_PRIMARY_BUFFER docs that it it only supported on
vulkan, dx12, and metal.
2022-11-02 02:14:42 -04:00
Imbris f018e9539b Rework buffer_usage test to properly check every failure case using error scopes (instead of accidentally just testing the first one). 2022-11-02 02:14:42 -04:00
Imbris 6ba30cbc0b Run tests in the CI for all workspace members 2021-08-17 13:57:29 -04:00
ImbrisandJoão Capucho 168a55396c [glsl-in] Add full init_declarator_list support
Co-authored-by: João Capucho <jcapucho7@gmail.com>
2021-05-19 16:24:26 -04:00
Imbris 3073ade8a4 [glsl-in] improved WIP parsing for declarations 2021-05-19 16:24:26 -04:00
Imbris bbc5ba3050 [rs] Skip mapping of zero sized buffers in create_buffer_init to avoid a panic and avoid creating an unused padded buffer 2021-05-03 22:22:49 -04:00
Imbris 2c153f5d50 Fix issue with multiple queued mappings where the last one is not cancelled 2021-02-28 00:56:17 -05:00
Imbris c82a3a77d2 Avoid panic when requesting to unmap a buffer that is pending mapping 2021-02-27 17:38:53 -05:00
Imbris 5a9801d86c [rs] Expose missing constants from wgpu-types 2021-02-07 15:08:17 -05:00
Imbris b1e535d2b7 [rs] Bump wgpu-core 2021-02-05 22:02:48 -05:00
Imbris e775987233 Pass DEPTH_CLAMPING feature request to gfx-hal 2020-12-19 16:14:51 -05:00
Imbris 44a20d72ef Make VertexFormat::size a const fn 2020-11-26 03:36:13 -05:00