dawn-cmake/test
Antonio Maiorano 821f9bb525 Fix FXC compile errors on divide by zero
FXC fails to compile when it determines that the rhs of an integral
division is zero with "error X4010: Unsigned integer divide by zero".

bclayton's fix (https://dawn-review.googlesource.com/c/tint/+/60500)
addressed cases for division by an integer constant 0. This CL adds the
missing support for division by integral vectors with 0 components.

FXC also fails on division by integral expressions that it can fold to
0. To handle these cases, we now emit a runtime check for 0 and replace
by 1. In the cases I've tested, FXC seems able to optimize these checks
away.

Bug: tint:1083
Change-Id: I02f08e9077882f03c1e42b62dacb742a48fa48ba
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/73580
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-12-21 14:48:26 +00:00
..
access GLSL: add .expected.glsl files for all tests. 2021-11-16 15:15:36 +00:00
array tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
buffer tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
bug Fix FXC compile errors on divide by zero 2021-12-21 14:48:26 +00:00
expressions Fix FXC compile errors on divide by zero 2021-12-21 14:48:26 +00:00
identifiers/underscore IntrinsicTable: remove double underscores 2021-11-22 15:24:16 +00:00
intrinsics Update GLSL expected results. 2021-12-21 01:48:13 +00:00
layout/storage/mat2x2 tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
let GLSL: implement atomics. 2021-11-19 17:46:13 +00:00
loops Manually generate HLSL skip files for vk-gl-cts e2e tests 2021-12-08 04:26:58 +00:00
ptr_ref tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
samples tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
shader_io Update GLSL expected results. 2021-12-21 01:48:13 +00:00
shadowing resolver: Support shadowing 2021-11-23 20:45:51 +00:00
statements e2e tests: generate missing expected files 2021-12-18 21:28:23 +00:00
struct GLSL: add .expected.glsl files for all tests. 2021-11-16 15:15:36 +00:00
types GLSL: fix single-valued vector init. 2021-11-22 16:14:16 +00:00
unittest/reader/spirv Roll SPIRV-Tools and SPIRV-Headers, fix spvasm 2021-12-17 20:45:22 +00:00
var Reland "HLSL: force FXC to never unroll loops" 2021-11-25 18:44:50 +00:00
vk-gl-cts Kokoro: run e2e tests with FXC validation 2021-12-13 19:19:58 +00:00
BUILD.gn HLSL: work around FXC failures when dynamically indexing arrays in structs 2021-12-13 15:55:11 +00:00
extract-spvasm.py Add --dump-spirv option to tint_unittests 2021-05-05 09:46:31 +00:00
test-all.sh main: Replace --dawn-validation with --validate 2021-06-02 21:02:34 +00:00