dawn-cmake/test/bug/fxc/dyn_array_idx/write
Antonio Maiorano d733fdb85c HLSL: work around FXC failures when dynamically indexing arrays in structs
FXC fails to compile code that assigns to dynamically-indexed fixed-size
arrays in structs on internal shader variables with:

error X3500: array reference cannot be used as an l-value; not natively
addressable

This CL detects this case, and transforms such assignments into copying
out the array to a local variable, assigning to that local, and then
copying the array back.

Also manually regenerate SKIPs for HLSL/FXC after this change, which
fixes 30 tests. Also exposes some "compilation aborted unexpectedly" now
that  "array reference cannot be used as an l-value" has been fixed. For
tests that fail for both DXC and FXC, updating SKIPs to the DXC one to
help distinguish actual FXC bugs from valid errors.

Bug: tint:998
Bug: tint:1206
Change-Id: I09204d8d81ab27d1c257538ad702414ccc386543
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71620
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-12-13 15:55:11 +00:00
..
function.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
function.wgsl.expected.glsl glsl: Always emit structures 2021-12-09 15:45:03 +00:00
function.wgsl.expected.msl msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
function.wgsl.expected.spvasm test: Add FXC test cases for indexing arrays in structs 2021-07-23 16:44:52 +00:00
function.wgsl.expected.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
function_via_param.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
function_via_param.wgsl.expected.glsl glsl: Always emit structures 2021-12-09 15:45:03 +00:00
function_via_param.wgsl.expected.msl msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
function_via_param.wgsl.expected.spvasm test: Add FXC test cases for indexing arrays in structs 2021-07-23 16:44:52 +00:00
function_via_param.wgsl.expected.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
private.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
private.wgsl.expected.glsl glsl: Always emit structures 2021-12-09 15:45:03 +00:00
private.wgsl.expected.msl msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
private.wgsl.expected.spvasm test: Add FXC test cases for indexing arrays in structs 2021-07-23 16:44:52 +00:00
private.wgsl.expected.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
private_via_param.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
private_via_param.wgsl.expected.glsl glsl: Always emit structures 2021-12-09 15:45:03 +00:00
private_via_param.wgsl.expected.msl msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
private_via_param.wgsl.expected.spvasm test: Add FXC test cases for indexing arrays in structs 2021-07-23 16:44:52 +00:00
private_via_param.wgsl.expected.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
storage.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
storage.wgsl.expected.glsl glsl: Always emit structures 2021-12-09 15:45:03 +00:00
storage.wgsl.expected.hlsl test: Add FXC test cases for indexing arrays in structs 2021-07-23 16:44:52 +00:00
storage.wgsl.expected.msl msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
storage.wgsl.expected.spvasm test: Add FXC test cases for indexing arrays in structs 2021-07-23 16:44:52 +00:00
storage.wgsl.expected.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
workgroup.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00
workgroup.wgsl.expected.glsl glsl: Always emit structures 2021-12-09 15:45:03 +00:00
workgroup.wgsl.expected.hlsl Reland "HLSL: force FXC to never unroll loops" 2021-11-25 18:44:50 +00:00
workgroup.wgsl.expected.msl msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
workgroup.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
workgroup.wgsl.expected.wgsl tests: Stop using the [[block]] attribute 2021-12-09 15:45:03 +00:00