Re: [Mesa-dev] [PATCH] nir/spirv: Allow loop breaks in a switch body.

2017-10-01 Thread Jason Ekstrand
Dave just told me on IRC about the SPIR-V opt discussion: https://github.com/KhronosGroup/SPIRV-Tools/issues/850 Assuming this actually solves the problem, Reviewed-by: Jason Ekstrand I would like to see CTS tests written for this and we had better die horribly without this patch and pass with

Re: [Mesa-dev] [PATCH] nir/spirv: Allow loop breaks in a switch body.

2017-10-01 Thread Jason Ekstrand
This looks correct but how did you come across it? Are there tests? On October 1, 2017 3:38:26 PM Bas Nieuwenhuizen wrote: Per the SPIR-V spec 2.11 Structured Control Flow: "The only blocks in a construct that can branch outside the construct are ... - a break block for the innermost loo

[Mesa-dev] [PATCH] nir/spirv: Allow loop breaks in a switch body.

2017-10-01 Thread Bas Nieuwenhuizen
Per the SPIR-V spec 2.11 Structured Control Flow: "The only blocks in a construct that can branch outside the construct are ... - a break block for the innermost loop it is inside of. ..." With "Break block: A block containing a branch to the Merge Block of a loop header's merge instruction."